]> git.pond.sub.org Git - empserver/blobdiff - scripts/savecore
scripts: Use mailx rather than mail, and drop bogus -e
[empserver] / scripts / savecore
index 9540da63c031e4a9cb88bd6b16da23751930d1ec..e2b2ae0feee966f9e44ce0f6bc7b717283f038a0 100755 (executable)
@@ -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
 
@@ -61,6 +60,7 @@ test -r "$core_name"
 tstamp=`/bin/date +%Y-%m-%d-%H:%M`
 saved_core=$core_dir/core-$tstamp
 
+mkdir -p $core_dir
 if [ `df -kP $core_dir | awk 'NR!=1 { print $4 }'` -lt "$space_low" ]
 then rm -f $core_name; exit
 fi