diff --git a/OneDriveSync b/OneDriveSync index d9a7800..05a4942 100644 --- a/OneDriveSync +++ b/OneDriveSync @@ -4,7 +4,7 @@ # Assumes that the sync target is set up as OneDrive:Syncs in rclone if [ $(id -u) -eq 0 ]; then - exec sudo -H -u $0 "$@" + exec sudo -H -u sintan $0 "$@" fi notify() { @@ -21,6 +21,6 @@ notify() { } 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!" diff --git a/huion-tablet-setup.sh b/huion-tablet-setup.sh index 7f5f882..250a925 100644 --- a/huion-tablet-setup.sh +++ b/huion-tablet-setup.sh @@ -12,14 +12,15 @@ # Make /usr/local/bin/huion-tablet-mount with this content : # #!/bin/sh +# # & exit # 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) -if [ $(xsetwacom --list | grep -c "HID 256c:006d") -ne "2" ]; then - echo "No supported devices found!" - exit +if [ "$(xsetwacom --list | grep -c 'HID 256c:006d')" -ne "2" ]; then + echo "No supported devices found!" + exit 1 fi sleep 1 diff --git a/impfilesbk b/impfilesbk index 7c605df..ff45f7b 100644 --- a/impfilesbk +++ b/impfilesbk @@ -2,12 +2,30 @@ # This script backs up some important stuff -echo `date` "| Backing up Documents..." | tee -a logfile -rsync -aAXH --delete --stats src dest | tee -a logfile -echo $'\n'`date` "| Done!" | tee -a logfile +echo `date` "| Backing up Documents..." | tee -a /home/sintan/TempStorage/impfilesbk.log +rsync -aAXH --delete --stats /home/sintan/Documents/ /mnt/storage/sintan/Documents/ | tee -a /home/sintan/TempStorage/impfilesbk.log +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