diff options
author | OlafBr <18134858+OlafBr@users.noreply.github.com> | 2019-09-04 10:27:42 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-09-06 19:30:04 +0300 |
commit | f4b4a659b5dc5267aa0eea8d7bab7d9b42a380b5 (patch) | |
tree | da0a4135657304798d4df4f765d34d9679c8a44f /bin/ncp | |
parent | fd2b74bdffc646e0cb155d46014fbb9048bc8db9 (diff) |
custom code before/after auto-backupv1.16.2
Signed-off-by: OlafBr 18134858+OlafBr@users.noreply.github.com
Diffstat (limited to 'bin/ncp')
-rw-r--r-- | bin/ncp/BACKUPS/nc-backup-auto.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/ncp/BACKUPS/nc-backup-auto.sh b/bin/ncp/BACKUPS/nc-backup-auto.sh index ea6e1fda..b1c6acc6 100644 --- a/bin/ncp/BACKUPS/nc-backup-auto.sh +++ b/bin/ncp/BACKUPS/nc-backup-auto.sh @@ -18,11 +18,13 @@ configure() cat > /usr/local/bin/ncp-backup-auto <<EOF #!/bin/bash +[ -x /usr/local/bin/ncp-backup-auto-before ] && /usr/local/bin/ncp-backup-auto-before /usr/local/bin/ncc maintenance:mode --on /usr/local/bin/ncp-backup "$DESTDIR" "$INCLUDEDATA" "$COMPRESS" "$BACKUPLIMIT" || failed=true /usr/local/bin/ncc maintenance:mode --off [[ "\$failed" == "true" ]] && \ /usr/local/bin/ncc notification:generate "$NOTIFYUSER" "Auto-backup failed" -l "Your automatic backup failed" +[ -x /usr/local/bin/ncp-backup-auto-after ] && /usr/local/bin/ncp-backup-auto-after EOF chmod +x /usr/local/bin/ncp-backup-auto |