Date: Sun, 13 Aug 2006 00:32:07 -0700 From: Gordon Tetlow <gordon@tetlows.org> To: perl@freebsd.org Subject: Periodic script for SpamAssassin port Message-ID: <20060813073207.GJ99492@spiff.melthusia.org>
next in thread | raw e-mail | index | archive | help
--RIYY1s2vRbPFwWeW Content-Type: multipart/mixed; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline --5I6of5zJg18YgZEa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I hacked together a quick periodic script that will run sa-update and restart spamd (as necessary). I figured it might be useful to add it to the port. --5I6of5zJg18YgZEa Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="503.sa-update" #!/bin/sh # # $FreeBSD$ # # Maintenance shell script to download updates from the SpamAssassin # central update host. # Define these variables in either /etc/periodic.conf or # /etc/periodic.conf.local to override the default values. # # daily_sa_update_enable="YES" # do update daily_sa_update_enable="YES" # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf source_periodic_confs fi rc=0 case "$daily_sa_update_enable" in [Yy][Ee][Ss]) /usr/local/bin/sa-update case "$?" in 0) echo "SpamAssassin updates sucessfully installed." # Restart the spamd daemon. If it isn't configured # in /etc/rc.conf this does nothing. /usr/local/etc/rc.d/sa-spamd restart if [ $? -gt 0 ]; then echo "Problem restarting spamd." rc=3 fi ;; 1) echo "No SpamAssassin updates available." ;; *) echo "Errors were reported during SpamAssassin update." rc=3 ;; esac ;; esac exit $rc --5I6of5zJg18YgZEa-- --RIYY1s2vRbPFwWeW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE3tV3Ru2t9DV9ZfsRAvblAKCRe+0o8caDahjR5fajCoIdxDh23gCgi+FS SNVW9Vgfvwrf5omPdJcZWYY= =0f3P -----END PGP SIGNATURE----- --RIYY1s2vRbPFwWeW--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060813073207.GJ99492>