scripts: Use mailx rather than mail, and drop bogus -e
This commit is contained in:
parent
729cf65e12
commit
154f04f218
2 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# Backup script to be run from pre_update_hook
|
# 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.
|
# This script is in the public domain.
|
||||||
|
|
||||||
# Use: edit configuration variables below to taste, then set
|
# Use: edit configuration variables below to taste, then set
|
||||||
|
@ -63,7 +63,7 @@ tar czf $arc .
|
||||||
# user's privileges are carefully limited.
|
# user's privileges are carefully limited.
|
||||||
if [ "$remote_host" ]
|
if [ "$remote_host" ]
|
||||||
then
|
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
|
fi
|
||||||
#
|
#
|
||||||
# A more secure alternative is to replace the scp command by something like
|
# A more secure alternative is to replace the scp command by something like
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# Script to save core files, to be run from post_crash_dump_hook
|
# 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.
|
# This script is in the public domain.
|
||||||
|
|
||||||
# Use: edit configuration variables below to taste, then set
|
# Use: edit configuration variables below to taste, then set
|
||||||
|
@ -37,7 +37,6 @@ privlog=
|
||||||
|
|
||||||
# Program to send mail
|
# Program to send mail
|
||||||
mailx=mailx
|
mailx=mailx
|
||||||
#mailx=mail
|
|
||||||
|
|
||||||
# End of configuration
|
# End of configuration
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue