nc-backup-auto: notify failures

This commit is contained in:
nachoparker 2019-02-17 00:29:52 -07:00
parent 743cb24610
commit 41a48c97aa
3 changed files with 14 additions and 4 deletions

View File

@ -18,9 +18,11 @@ configure()
cat > /usr/local/bin/ncp-backup-auto <<EOF
#!/bin/bash
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
/usr/local/bin/ncp-backup "$DESTDIR" "$INCLUDEDATA" "$COMPRESS" "$BACKUPLIMIT"
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
ncc maintenance:mode --on
/usr/local/bin/ncp-backup "$DESTDIR" "$INCLUDEDATA" "$COMPRESS" "$BACKUPLIMIT" || failed=true
ncc maintenance:mode --off
[[ "\$failed" == "true" ]] && \
ncc notification:generate "$NOTIFYUSER" "Auto-backup failed" -l "Your automatic backup failed"
EOF
chmod +x /usr/local/bin/ncp-backup-auto

View File

@ -1,5 +1,7 @@
[v1.6.6](https://github.com/nextcloud/nextcloudpi/commit/93cc781) (2019-02-15) nc-automount: fix NFS delay
[v1.6.7](https://github.com/nextcloud/nextcloudpi/commit/3bcccdd) (2019-02-17) nc-backup-auto: notify failures
[v1.6.6](https://github.com/nextcloud/nextcloudpi/commit/743cb24) (2019-02-15) nc-automount: fix NFS delay
[v1.6.5 ](https://github.com/nextcloud/nextcloudpi/commit/c28868d) (2019-02-15) nc-trusted-domains: empty values by default

View File

@ -42,6 +42,12 @@
"name": "Backup limit",
"suggest": "4",
"value": "4"
},
{
"id": "NOTIFYUSER",
"name": "Notify user",
"suggest": "ncp",
"value": "ncp"
}
]
}