proxmox-spamassassin/upstream/spamd/OSXStartup/SAspamd
Stoiko Ivanov 37ef577538 buildsys: drop upstream tarball and add extracted sources
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-03-24 18:19:35 +01:00

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"