| Server IP : 85.214.239.14 / Your IP : 216.73.216.99 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/task/2/cwd/proc/3/cwd/etc/mail/spamassassin/sa-update-hooks.d/ |
Upload File : |
#!/bin/sh
#This scripts restarts amavisd-new after spamassassin
#rules got updated
NAME=amavisd-new
AMAVISPID=/var/run/amavis/amavisd.pid
INIT=/etc/init.d/amavis
# stolen from dhcpd3 initscript
# single arg is -v for messages, -q for none
check_status()
{
if [ ! -r "$AMAVISPID" ]; then
test "$1" != -v || echo "$NAME is not running."
return 3
fi
if read pid < "$AMAVISPID" && ps -p "$pid" > /dev/null 2>&1; then
test "$1" != -v || echo "$NAME is running."
return 0
else
test "$1" != -v || echo "$NAME is not running but $AMAVISPID exists."
return 1
fi
}
#exit if amavis is not running
check_status || exit
$INIT restart > /dev/null