mirror of
https://git.proxmox.com/git/proxmox-spamassassin
synced 2025-08-17 07:29:56 +00:00
42 lines
650 B
Bash
Executable File
42 lines
650 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Startup spamd
|
|
|
|
. /etc/rc.common
|
|
|
|
PIDFILE=/var/run/spamd.pid
|
|
SPAMD=spamd
|
|
|
|
StartService ()
|
|
{
|
|
if [ -r $PIDFILE ]; then
|
|
ConsoleMessage "spamd already running"
|
|
else
|
|
ConsoleMessage "Starting spamd"
|
|
$SPAMD -d -r $PIDFILE
|
|
fi
|
|
}
|
|
|
|
StopService ()
|
|
{
|
|
if [ -r $PIDFILE ]; then
|
|
ConsoleMessage "Stopping spamd"
|
|
kill -TERM `cat $PIDFILE`
|
|
else
|
|
ConsoleMessage "spamd not running"
|
|
fi
|
|
}
|
|
|
|
RestartService ()
|
|
{
|
|
if [ -r $PIDFILE ]; then
|
|
ConsoleMessage "Restarting spamd"
|
|
kill -HUP `cat $PIDFILE`
|
|
else
|
|
ConsoleMessage "spamd not running. Starting"
|
|
StartService
|
|
fi
|
|
}
|
|
|
|
RunService "$1"
|