scripts: Use mailx rather than mail, and drop bogus -e

This commit is contained in:
Markus Armbruster 2012-06-25 07:48:21 +02:00
parent 729cf65e12
commit 154f04f218
2 changed files with 3 additions and 4 deletions

View file

@ -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

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
# Script to save core files, to be run from post_crash_dump_hook
# Written by Markus Armbruster, 2008-2011
# Written by Markus Armbruster, 2008-2012
# This script is in the public domain.
# Use: edit configuration variables below to taste, then set
@ -37,7 +37,6 @@ privlog=
# Program to send mail
mailx=mailx
#mailx=mail
# End of configuration