#!/bin/bash # Only restart spamd if sa-update returns 0, meaning it updated the rules export HOME=@homedir@ cd $HOME (/usr/bin/sa-update \ --gpgkeyfile @configdir@/gpgkeys \ --channelfile @configdir@/channels \ && service spamassassin condrestart > /dev/null) 2>&1 \ | tee -a /var/log/sa-update.log