X-Git-Url: https://git.donarmstrong.com/?p=spamassassin_config.git;a=blobdiff_plain;f=update_spamassassin;h=3a15e883ca5d63070014862da8be58cd2f0b2d87;hp=0c3cdb0ab4f51530dcd81187c375903791a47fb2;hb=1a5722971f4e9d1b8c4fc1f1675e3a04ad3b6bac;hpb=301e089ae6e8b12165f04872eab491019b7cef1f diff --git a/update_spamassassin b/update_spamassassin index 0c3cdb0..3a15e88 100755 --- a/update_spamassassin +++ b/update_spamassassin @@ -9,6 +9,8 @@ SVN=$(which svn) TMPDIR=$(mktemp -d); +HOSTNAME=$(hostname); + if [ "$HOSTNAME" = "rietz" ] || [ "$HOSTNAME" = "busoni" ]; then BASEDIR="/org/bugs.debian.org" USERCONF="bugs/user_prefs"; @@ -46,14 +48,14 @@ else echo $$ > "$SACONFIG/.update_spamassassin"; fi; -function remove_pidfile(){ +remove_pidfile () { rm "$SACONFIG/.update_spamassassin"; } -trap remove_pidfile ERR; +trap remove_pidfile 0; FAILUREMESSAGE=""; -function report_failure(){ +report_failure () { # Hrm; a previous update failed; don't report again until the file # is removed or it's more than a day old if [ -e "$SACONFIG/failed_update" ] &&