Skip to content

Instantly share code, notes, and snippets.

@adam12
Created October 29, 2011 23:47
Show Gist options
  • Save adam12/1325254 to your computer and use it in GitHub Desktop.
Save adam12/1325254 to your computer and use it in GitHub Desktop.
#!/bin/sh
/usr/bin/sa-update
if [ $? -eq 0 ]; then
# New rules were installed. Restart spamd
echo 'New spamassassin rules available and installed. Restarting spamassassin'
pkill -9 -f /usr/bin/spamd
/usr/bin/spamd -d -c -m 5
exit 0
else
# No updates available.
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment