]> git.pond.sub.org Git - empserver/blobdiff - scripts/backup
scripts: Use mailx rather than mail, and drop bogus -e
[empserver] / scripts / backup
index 20a2a6abbc7609d14e44c416cc287288d9c19660..c6c51f06ffad369fc751053ae8e5a1ff67cc2ba0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 # Backup script to be run from pre_update_hook
-# Written by Markus Armbruster, 2005
+# Written by Markus Armbruster, 2005-2012
 # This script is in the public domain.
 
 # Use: edit configuration variables below to taste, then set
@@ -63,7 +63,7 @@ tar czf $arc .
 # user's privileges are carefully limited.
 if [ "$remote_host" ]
 then
-    nohup sh -c "scp -qBp '$arc' '$remote_host:$remote_dir' 2>&1 | mail -e -s 'Empire backup save failed' '$email'" </dev/null >/dev/null 2>&1 &
+    nohup sh -c "scp -qBp '$arc' '$remote_host:$remote_dir' 2>&1 | mailx -s 'Empire backup save failed' '$email'" </dev/null >/dev/null 2>&1 &
 fi
 #
 # A more secure alternative is to replace the scp command by something like