diff --git a/nixos/hosts/backups-rpi4/backup-script.nix b/nixos/hosts/backups-rpi4/backup-script.nix index 9103cf18..be239dbe 100644 --- a/nixos/hosts/backups-rpi4/backup-script.nix +++ b/nixos/hosts/backups-rpi4/backup-script.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let ifExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; - rsync-backup = pkgs.writeScriptBin "rsync-backup" '' + rsync-backups = pkgs.writeScriptBin "rsync-backups" '' #!${pkgs.stdenv.shell} # Send the gotify notification: @@ -27,7 +27,7 @@ fi echo -e "======= Time started : `date`" -if [[ `ps aux | grep rsync | grep -v grep | grep -v rsync-all` ]] ; then +if [[ `ps aux | grep rsync | grep -v grep | grep -v rsync-backups` ]] ; then echo -e "================================================================================" echo -e "rsync still running. Exiting...." echo -e "======= Time complete: `date`" @@ -113,7 +113,7 @@ curl -X 'POST' 'https://gotify.sysctl.io/message' -H 'accept: application/json' ''; in { - environment.systemPackages = [ rsync-backup ]; + environment.systemPackages = [ rsync-backups ]; # Set up the secret for the password: sops.secrets."gotify_token" = { diff --git a/nixos/hosts/backups-rpi4/cron.nix b/nixos/hosts/backups-rpi4/cron.nix index 67f30d4b..5230df1b 100644 --- a/nixos/hosts/backups-rpi4/cron.nix +++ b/nixos/hosts/backups-rpi4/cron.nix @@ -4,7 +4,7 @@ systemCronJobs = [ # Backups from nuc-docker01 - See "backup-script.nix" # https://git.sysctl.io/albert/random-scripts/src/branch/master/rsync-pi/rsync-all.sh - ''0 9 * * * root rsync-backup >> /root/logs/rsync-backup-`date "+\%Y-\%m-\%d"`'' + ''0 9 * * * root rsync-backups >> /root/logs/rsync-backup-`date "+\%Y-\%m-\%d"`'' ]; }; } \ No newline at end of file