mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08: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
|
||||
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
exec sudo -H -u <user> $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!"
|
||||
|
||||
|
|
|
@ -12,14 +12,15 @@
|
|||
|
||||
# Make /usr/local/bin/huion-tablet-mount with this content :
|
||||
# #!/bin/sh
|
||||
#
|
||||
# <location-of-this-script> & 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
|
||||
|
|
30
impfilesbk
30
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
|
||||
|
|
Loading…
Reference in a new issue