mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 21:18:36 -06:00
Small changes
This commit is contained in:
parent
bcb2963fc9
commit
40475f79a7
3 changed files with 30 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
||||||
# Assumes that the sync target is set up as OneDrive:Syncs in rclone
|
# Assumes that the sync target is set up as OneDrive:Syncs in rclone
|
||||||
|
|
||||||
if [ $(id -u) -eq 0 ]; then
|
if [ $(id -u) -eq 0 ]; then
|
||||||
exec sudo -H -u <user> $0 "$@"
|
exec sudo -H -u sintan $0 "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notify() {
|
notify() {
|
||||||
|
@ -21,6 +21,6 @@ notify() {
|
||||||
}
|
}
|
||||||
|
|
||||||
notify "OneDrive sync" "Sync started..."
|
notify "OneDrive sync" "Sync started..."
|
||||||
flock -n .onedrivesynclock rclone sync -c -L --log-file=logfile --log-level INFO source OneDrive:Syncs
|
flock -n .onedrivesynclock rclone sync -c -L --log-file="/home/sintan/TempStorage/OneDriveSync.log" --log-level INFO "/home/sintan/TempStorage/OneDrive/" OneDrive:Syncs
|
||||||
notify "OneDrive sync" "Sync finished!"
|
notify "OneDrive sync" "Sync finished!"
|
||||||
|
|
||||||
|
|
|
@ -12,14 +12,15 @@
|
||||||
|
|
||||||
# Make /usr/local/bin/huion-tablet-mount with this content :
|
# Make /usr/local/bin/huion-tablet-mount with this content :
|
||||||
# #!/bin/sh
|
# #!/bin/sh
|
||||||
|
#
|
||||||
# <location-of-this-script> & exit
|
# <location-of-this-script> & exit
|
||||||
|
|
||||||
# Make sure to install xf86-input-wacom (might have to restart)
|
# Make sure to install xf86-input-wacom (might have to restart)
|
||||||
# Add this script to autostart of your DE or .profile or somehow make it run at boot (so that it works in case the tablet is connected at boot)
|
# Add this script to autostart of your DE or .profile or somehow make it run at boot (so that it works in case the tablet is connected at boot)
|
||||||
|
|
||||||
if [ $(xsetwacom --list | grep -c "HID 256c:006d") -ne "2" ]; then
|
if [ "$(xsetwacom --list | grep -c 'HID 256c:006d')" -ne "2" ]; then
|
||||||
echo "No supported devices found!"
|
echo "No supported devices found!"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
30
impfilesbk
30
impfilesbk
|
@ -2,12 +2,30 @@
|
||||||
|
|
||||||
# This script backs up some important stuff
|
# This script backs up some important stuff
|
||||||
|
|
||||||
echo `date` "| Backing up Documents..." | tee -a logfile
|
echo `date` "| Backing up Documents..." | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
rsync -aAXH --delete --stats src dest | tee -a logfile
|
rsync -aAXH --delete --stats /home/sintan/Documents/ /mnt/storage/sintan/Documents/ | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
echo $'\n'`date` "| Done!" | tee -a logfile
|
echo $'\n'`date` "| Done!" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
echo "----------" | tee -a logfile
|
echo "----------" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
# Do as many times as needed with dest, src, logfile etc replaced with proper locations
|
echo `date` "| Backing up Academics..." | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
rsync -aAXH --delete --stats /home/sintan/Academics/ /mnt/storage/sintan/Academics/ | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
echo $'\n'`date` "| Done!" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
echo $'\n'"--------------------------------------------------" | tee -a logfile
|
echo "----------" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
|
echo `date` "| Backing up Pictures..." | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
rsync -aAXH --delete --stats /home/sintan/Pictures/ /mnt/storage/sintan/Pictures/ | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
echo $'\n'`date` "| Done!" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
|
echo "----------" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
|
echo `date` "| Backing up Zotero..." | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
rsync -aAXH --delete --stats /home/sintan/Zotero/ /mnt/storage/sintan/Zotero/ | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
echo $'\n'`date` "| Done!" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
|
echo `date` "| Backing up some config files and stuff..." | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
rsync -aAXH --delete --stats /home/sintan/.config /home/sintan/.tmux.conf /home/sintan/.profile /home/sintan/.bashrc /home/sintan/.Xresources /home/sintan/.local/bin/personal /home/sintan/.ssh /mnt/storage/sintan/config/ | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
echo $'\n'`date` "| Done!" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
||||||
|
echo $'\n'"--------------------------------------------------" | tee -a /home/sintan/TempStorage/impfilesbk.log
|
||||||
|
|
Loading…
Reference in a new issue