izbacivanje spamassassin.heinlein-support.de
[spamassassin-cn.git] / debian / cron.daily
index 4acf67e..c577e10 100755 (executable)
@@ -12,26 +12,21 @@ if [ -e /etc/spamassassin/sa-update.channels ]; then
     sa-update \
         --channelfile /etc/spamassassin/sa-update.channels \
         --allowplugins \
-        --gpgkey 6C6191E3 \
-        --gpgkey 24F434CE \
-        --gpgkey BDE9DC10 || \
+        --gpghomedir /etc/spamassassin/sa-update-keys || \
     ( echo "$(date +'%d-%m-%Y %T'): No new rules. Exiting now."; exit )
 fi
 
 # restart of services
 echo "$(date +'%d-%m-%Y %T'): Will restart services due to updated rules..."
-if [ -x /usr/sbin/invoke-rc.d ]; then
-    [ -x /etc/init.d/spamassassin ] && \
-        invoke-rc.d --quiet spamassassin restart
-    [ -x /etc/init.d/amavis ] && \
-        invoke-rc.d --quiet amavis restart
-    [ -x /etc/init.d/postfix ] && \
-        invoke-rc.d --quiet postfix restart
-else
-    [ -x /etc/init.d/spamassassin ] && \
-        /etc/init.d/spamassassin restart
-    [ -x /etc/init.d/amavis ] && \
-        /etc/init.d/amavis restart
-    [ -x /etc/init.d/postfix ] && \
-        /etc/init.d/postfix restart
+
+if [ -x /etc/init.d/spamassassin ]; then
+  service spamassassin restart
+fi
+
+if [ -x /etc/init.d/amavis ]; then
+  service amavis restart
+fi
+
+if [ -x /etc/init.d/postfix ]; then
+  service postfix restart
 fi