test
This commit is contained in:
parent
f325999058
commit
477b5b0f10
2 changed files with 4 additions and 4 deletions
|
@ -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" = {
|
||||
|
|
|
@ -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"`''
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue