]> git.donarmstrong.com Git - spamassassin_config.git/blobdiff - update_spamassassin
even more changes from blars
[spamassassin_config.git] / update_spamassassin
index 2200421cd6a59881605f9873058be84955a59510..3b25d6ae0470092ddfba31c5b985004d084b765f 100755 (executable)
@@ -75,14 +75,14 @@ if svn status |grep -q '^C'; then
 fi;
 cd - >/dev/null 2>&1
 
-FAILUREMESSAGE="$(spamassassin -C $TMPDIR/spamassassin_config/$USERCONF --lint)"
-if [ "$?" != "0" ]; then
-    FAILUREMESSAGE="$(echo -e 'spamassassin -C $TMPDIR/spamassassin_config/$USERCONF --lint\nfailed with\n')$FAILUREMESSAGE";
+if ! spamassassin -C $TMPDIR/spamassassin_config/$USERCONF --lint > $TMPDIR/sa_lint 2>&1; then
+    FAILUREMESSAGE="$(echo -e 'spamassassin -C $TMPDIR/spamassassin_config/$USERCONF --lint\nfailed with\n'| cat - $TMPDIR/sa_lint)";
     report_failure
 fi;
 mv "$SACONFIG" "$BAKDIR/spamassassin_config_r$ORIGREV"
 mv "$TMPDIR/spamassassin_config" "$SACONFIG"
 trap ERR
+remove_pidfile
 rm -rf "$TMPDIR"
 
 if [ "$HOSTNAME" == "rietz" ]; then
@@ -95,4 +95,4 @@ else
 fi;
 
 
-exit 0;
\ No newline at end of file
+exit 0;