diff --git a/nixos/common/packages/default.nix b/nixos/common/packages/default.nix index 2b27ea77..9dff0752 100644 --- a/nixos/common/packages/default.nix +++ b/nixos/common/packages/default.nix @@ -23,7 +23,6 @@ tree # CLI directory display software nmap # network mapping / discovery software busybox # General linux commands, nslookup, dig, etc - busybox # Linux utilities ethtool # Ethernet troubleshooting:with file # Shows the types of files inputs.superfile.packages.${system}.default # Superfile CLI file browser diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh index 8891a837..6906cabd 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh @@ -28,7 +28,7 @@ fi # If an old backup is still running, don't continue count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) -if [[ $count -ge 1 ]] ; then +if [[ $count -ge 2 ]] ; 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\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh index 56df974a..01423cf3 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh @@ -28,7 +28,7 @@ fi # If an old backup is still running, don't continue count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) -if [[ $count -ge 1 ]] ; then +if [[ $count -ge 2 ]] ; 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\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh index 8e74c47a..e4709377 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh @@ -7,7 +7,8 @@ curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" # If an old backup is still running, don't continue count=$(ps aux | grep $BACKUP_NAME | grep -v grep | wc -l) -if [[ $count -ge 1 ]] ; then +if [[ $count -ge 2 ]] ; then + # There will always be at least 1: the current cronjob that's running 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\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"