Skip to content

Commit

Permalink
nc-backup-auto: fix notify_admin
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <nacho@ownyourbits.com>
  • Loading branch information
nachoparker committed Apr 6, 2020
1 parent 3a5769b commit ae6c88f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/ncp/BACKUPS/nc-backup-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ configure()

cat > /usr/local/bin/ncp-backup-auto <<EOF
#!/bin/bash
source /usr/local/etc/library.sh
[ -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"
notify_admin "Auto-backup failed" "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
Expand Down
3 changes: 3 additions & 0 deletions updates/1.24.0.sh → updates/1.25.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ grep -q '^SSLProtocol all -SSLv2 -SSLv3' "${file}" && {
bash -c "sleep 10 && service apache2 reload" &>/dev/null &
}

# fix nc-backup-auto
is_active_app nc-backup-auto && run_app nc-backup-auto

# docker images only
[[ -f /.docker-image ]] && {
:
Expand Down

0 comments on commit ae6c88f

Please sign in to comment.