From d6b40f5ea3a206bfe95b147afd1887e0e866dc3b Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 30 Aug 2021 16:14:08 +0200 Subject: [PATCH 1/2] Updated rsync.sh results --- bin/rsync.sh | 143 +++++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 67 deletions(-) diff --git a/bin/rsync.sh b/bin/rsync.sh index ee72dd9..4c8105e 100755 --- a/bin/rsync.sh +++ b/bin/rsync.sh @@ -3,39 +3,39 @@ TYPE='' # usb / sshfs CMD=rsync ARGS='-avz --delete - --exclude /Nextcloud - --exclude /.cache - --exclude /Downloads - --exclude /.thunderbird - --exclude /Projects - --exclude /Software - --exclude /tmp - --exclude /fonts - --exclude /Music - --exclude /node_modules - --exclude /snap - --exclude /.local/share/Trash - --exclude /.npm - --exclude /.thumbnails - --exclude /Android - --exclude /.AndroidStudio* - --exclude /.android - --exclude /.bundle/cache - --exclude /.config/cache - --exclude /.config/Code/Cache - --exclude /.config/Code/CachedData - --exclude /.config/Slack - --exclude /.config/*/Cache - --exclude /.config/chromium - --exclude /.mozilla - --exclude /.config/discord - --exclude /.config/spotify - --exclude /.crashlytics - --exclude /.fastlane - --exclude /.gradle - --exclude ./Software - --exclude /.local - --exclude /.DataGrip*' +--exclude /Nextcloud +--exclude /.cache +--exclude /Downloads +--exclude /.thunderbird +--exclude /Projects +--exclude /Software +--exclude /tmp +--exclude /fonts +--exclude /Music +--exclude /node_modules +--exclude /snap +--exclude /.local/share/Trash +--exclude /.npm +--exclude /.thumbnails +--exclude /Android +--exclude /.AndroidStudio* +--exclude /.android +--exclude /.bundle/cache +--exclude /.config/cache +--exclude /.config/Code/Cache +--exclude /.config/Code/CachedData +--exclude /.config/Slack +--exclude /.config/*/Cache +--exclude /.config/chromium +--exclude /.mozilla +--exclude /.config/discord +--exclude /.config/spotify +--exclude /.crashlytics +--exclude /.fastlane +--exclude /.gradle +--exclude ./Software +--exclude /.local +--exclude /.DataGrip*' ORIG='/home/dbroqua/' DEST='' HOSTNAME=`hostname` @@ -48,46 +48,55 @@ DEST_USB="/mnt/backup/${HOSTNAME}/dbroqua/" # SSHFS DEST_SSHFS="storage:Backup/${HOSTNAME}/dbroqua/" -echo `date` > ${ORIG}/lastBackup while getopts t:h opt do - case $opt in - t) - case ${OPTARG} in - usb) - TYPE='usb' - DEST=${DEST_USB} - ;; - sshfs) - TYPE='sshfs' - DEST=${DEST_SSHFS} - ;; - *) - echo "usb / sshfs attendu" - exit 1; - esac - ;; - esac + case $opt in + t) + case ${OPTARG} in + usb) + TYPE='usb' + DEST=${DEST_USB} + ;; + sshfs) + TYPE='sshfs' + DEST=${DEST_SSHFS} + ;; + *) + echo "usb / sshfs attendu" + exit 1; + esac + ;; + esac done -echo "Method: ${TYPE}" >> ${ORIG}/lastBackup if [ "${TYPE}" != '' ] ; then - case ${TYPE} in - usb) - sudo cryptsetup luksOpen /dev/sdb1 backup - sudo mount /dev/mapper/backup ${MOUNT} - echo "Go !" - if [ $? == 0 ] ; then - ${CMD} ${ARGS} ${ORIG} ${DEST} - fi - sudo umount ${MOUNT} - sudo cryptsetup luksClose backup - ;; - sshfs) - ${CMD} ${ARGS} ${ORIG} ${DEST} - ;; - esac + case ${TYPE} in + usb) + sudo cryptsetup luksOpen /dev/sdb1 backup + sudo mount /dev/mapper/backup ${MOUNT} + echo "Go !" + if [ $? == 0 ] ; then + ${CMD} ${ARGS} ${ORIG} ${DEST} + fi + sudo umount ${MOUNT} + sudo cryptsetup luksClose backup + ;; + sshfs) + ${CMD} ${ARGS} ${ORIG} ${DEST} + ;; + esac +fi + +echo $? + +if [ $? == 0 ] ; then + echo `date` > ${ORIG}/lastBackup + echo "Method: ${TYPE}" >> ${ORIG}/lastBackup + rm ${ORIG}/lastFailBackup +else + echo `date` > ${ORIG}/lastFailBackup + echo "Method: ${TYPE}" >> ${ORIG}/lastFailBackup fi From c7ac3f58549087974332db3f6d34135cdd331b21 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 30 Aug 2021 16:16:00 +0200 Subject: [PATCH 2/2] Replaced termite by alacritty --- config/sway/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sway/config b/config/sway/config index 71d4752..de4a391 100644 --- a/config/sway/config +++ b/config/sway/config @@ -63,7 +63,7 @@ set $nord14 #A3BE8C set $nord15 #B48EAD # Your preferred terminal emulator -set $term /usr/bin/termite +set $term /usr/local/bin/alacritty # Your preferred application launcher set $menu wofi -c ~/.config/wofi/config -s ~/.config/wofi/style.css -I