From 311ab87aedcaff0e51fb55c328f28f5924944377 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 17 Apr 2024 22:47:12 +0900 Subject: [PATCH] Testing --- nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh index 20921192..a8a0cb5f 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh @@ -27,6 +27,9 @@ if [[ $mounted1 != 0 ]] || [[ $mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then fi # If an old backup is still running, don't continue + +echo "Checking run" +ps aux | grep $BACKUP_NAME | grep -v grep if [[ `ps aux | grep $BACKUP_NAME | grep -v grep` ]] ; then echo -e "$BACKUP_NAME rsync still running. Exiting...." payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"