X-Git-Url: https://git.donarmstrong.com/?p=spamassassin_config.git;a=blobdiff_plain;f=update_spamassassin;h=0e08376e90baefa06ba4ba87b8a1e70d2d4b0179;hp=00c540f48d05306f3b822b387d545415187c9c62;hb=94ab480957ee40f80d2471d048d5af581488357d;hpb=05eda589302202d16da09d6ec493c8d09cfbd2aa diff --git a/update_spamassassin b/update_spamassassin index 00c540f..0e08376 100755 --- a/update_spamassassin +++ b/update_spamassassin @@ -9,12 +9,12 @@ SVN=$(which svn) TMPDIR=$(mktemp -d); -if [ "$HOSTNAME" == "rietz" ]; then +if [ "$HOSTNAME" = "rietz" ]; then BASEDIR="/org/bugs.debian.org" USERCONF="bugs/user_prefs"; -elif [ "$HOSTNAME" == "murphy" ]; then +elif [ "$HOSTNAME" = "liszt" ]; then BASEDIR="/var/list/.etc"; - USERCONF="bugs/user_prefs"; + USERCONF="lists/user_prefs"; else echo "Unknown hostname '$HOSTNAME'"; exit 1; @@ -28,11 +28,11 @@ ORIGREV=$(svn info $SACONFIG |awk '/^Revision:/{print $2}') NEWREV=$(svn info $(svn info $SACONFIG|awk '/^URL:/{print $2}')|awk '/^Revision:/{print $2}') # no changes, bug out. -if [ $ORIGREV -ge $NEWREV ]; then +if [ "$ORIGREV" -ge "$NEWREV" ]; then exit 0; fi; -if [ -e "$SACONFIG/.update_spamassassin" ] && kill -0 $(cat "$SACONFIG/.update_spamassassin"); then +if [ -e "$SACONFIG/.update_spamassassin" ] && kill -0 $(cat "$SACONFIG/.update_spamassassin") >/dev/null 2>&1; then echo "Another update_spamassassin appears to be running" exit 1; else @@ -81,13 +81,13 @@ if ! spamassassin -p $TMPDIR/spamassassin_config/$USERCONF --lint > $TMPDIR/sa_l fi; mv "$SACONFIG" "$BAKDIR/spamassassin_config_r$ORIGREV" mv "$TMPDIR/spamassassin_config" "$SACONFIG" -trap ERR +trap - ERR remove_pidfile rm -rf "$TMPDIR" if [ "$HOSTNAME" == "rietz" ]; then touch /home/debbugs/.spamassassin/user_prefs -elif [ "$HOSTNAME" == "murphy" ]; then +elif [ "$HOSTNAME" == "liszt" ]; then # do nothing true; else