summaryrefslogtreecommitdiff
path: root/system/clamsmtp/rc.clamsmtpd
diff options
context:
space:
mode:
Diffstat (limited to 'system/clamsmtp/rc.clamsmtpd')
-rw-r--r--system/clamsmtp/rc.clamsmtpd11
1 files changed, 7 insertions, 4 deletions
diff --git a/system/clamsmtp/rc.clamsmtpd b/system/clamsmtp/rc.clamsmtpd
index c6a7e61dc8..d561a8d173 100644
--- a/system/clamsmtp/rc.clamsmtpd
+++ b/system/clamsmtp/rc.clamsmtpd
@@ -13,8 +13,12 @@ CONFIG="/etc/clamsmtpd.conf"
PIDFILE="/var/run/clamav/clamsmtpd.pid"
clamsmtpd_start() {
- echo "Starting clamsmtp daemon"
- /usr/sbin/clamsmtpd -f $CONFIG -p $PIDFILE
+ if [ -f $PIDFILE ]; then
+ echo "Clamsmtp daemon seems to be running with PID: $(cat $PIDFILE)"
+ else
+ echo "Starting clamsmtp daemon"
+ /usr/sbin/clamsmtpd -f $CONFIG -p $PIDFILE
+ fi
}
clamsmtpd_stop() {
@@ -43,9 +47,8 @@ case "$1" in
'restart')
clamsmtpd_restart
;;
-'*')
+*)
echo "USAGE: $0 start|stop|restart"
exit 1
;;
esac
-