summaryrefslogtreecommitdiff
path: root/test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
committerReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
commitb370dc014446dfe1ea9b8926d13dc8ec643f33b9 (patch)
tree95f1c8cb423c894e75ce0b27b50f56ffdd2fc7e4 /test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh
parente9db5f7277a85068ef9e5515adf8577f74814d5e (diff)
parent6017757bc079f4446aa77bc5c0855c52741280f4 (diff)
Update upstream source from tag 'upstream/0.13__git20190527.g039c4a1'
Update to upstream version '0.13~~git20190527.g039c4a1' with Debian dir 2f67398c74e85067e31e6bf62658e5870a79e436
Diffstat (limited to 'test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh')
-rwxr-xr-xtest/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh b/test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh
new file mode 100755
index 00000000..48e8cf8e
--- /dev/null
+++ b/test/basicserver/testfiles/seclevel2-sha256/bbackupd/NotifySysadmin.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# This script is run whenever bbackupd changes state or encounters a
+# problem which requires the system administrator to assist:
+#
+# 1) The store is full, and no more data can be uploaded.
+# 2) Some files or directories were not readable.
+# 3) A backup run starts or finishes.
+#
+# The default script emails the system administrator, except for backups
+# starting and stopping, where it does nothing.
+
+SUBJECT="BACKUP PROBLEM on host debian-unstable"
+SENDTO="chris"
+
+if [ "$1" = "" ]; then
+ echo "Usage: $0 <store-full|read-error|backup-ok|backup-error|backup-start|backup-finish>" >&2
+ exit 2
+elif [ "$1" = store-full ]; then
+ sendmail: $SENDTO <<EOM
+Subject: $SUBJECT (store full)
+To: $SENDTO
+
+
+The store account for debian-unstable is full.
+
+=============================
+FILES ARE NOT BEING BACKED UP
+=============================
+
+Please adjust the limits on account 1234567 on server localhost.
+
+EOM
+elif [ "$1" = read-error ]; then
+sendmail: $SENDTO <<EOM
+Subject: $SUBJECT (read errors)
+To: $SENDTO
+
+
+Errors occured reading some files or directories for backup on debian-unstable.
+
+===================================
+THESE FILES ARE NOT BEING BACKED UP
+===================================
+
+Check the logs on debian-unstable for the files and directories which caused
+these errors, and take appropriate action.
+
+Other files are being backed up.
+
+EOM
+elif [ "$1" = backup-start -o "$1" = backup-finish -o "$1" = backup-ok ]; then
+ # do nothing by default
+ true
+else
+sendmail: $SENDTO <<EOM
+Subject: $SUBJECT (unknown)
+To: $SENDTO
+
+
+The backup daemon on debian-unstable reported an unknown error ($1).
+
+==========================
+FILES MAY NOT BE BACKED UP
+==========================
+
+Please check the logs on debian-unstable.
+
+EOM
+fi