@@ -179,7 +179,7 @@
echo -n "Starting snortsam "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
- /sbin/startproc $snortsam_BIN
+ /sbin/startproc -p /var/run/snortsam/snortsam.pid $snortsam_BIN
# Remember status and be verbose
rc_status -v
@@ -189,7 +189,7 @@
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
- /sbin/killproc -TERM $snortsam_BIN
+ /sbin/killproc -p /var/run/snortsam/snortsam.pid -TERM $snortsam_BIN
# Remember status and be verbose
rc_status -v
@@ -210,7 +210,7 @@
# Remember status and be quiet
rc_status
;;
- restart)
+ restart|reload|force-reload)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
@@ -219,36 +219,6 @@
# Remember status and be quiet
rc_status
;;
- force-reload)
- ## Signal the daemon to reload its config. Most daemons
- ## do this on signal 1 (SIGHUP).
- ## If it does not support it, restart the service if it
- ## is running.
-
- echo -n "Reload service snortsam "
- ## if it supports it:
- /sbin/killproc -HUP $snortsam_BIN
- #touch /var/run/snortsam.pid
- rc_status -v
-
- ## Otherwise:
- #$0 try-restart
- #rc_status
- ;;
- reload)
- ## Like force-reload, but if daemon does not support
- ## signaling, do nothing (!)
-
- # If it supports signaling:
- echo -n "Reload service snortsam "
- /sbin/killproc -HUP $snortsam_BIN
- #touch /var/run/snortsam.pid
- rc_status -v
-
- ## Otherwise if it does not support reload:
- #rc_failed 3
- #rc_status -v
- ;;
status)
echo -n "Checking for service snortsam "
## Check status with checkproc(8), if process is running
@@ -263,7 +233,7 @@
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
- /sbin/checkproc $snortsam_BIN
+ /sbin/checkproc -p /var/run/snortsam/snortsam.pid $snortsam_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
@@ -273,7 +243,7 @@
## argument to this init script which is required for a reload.
## Note: probe is not (yet) part of LSB (as of 1.9)
- test /etc/snortsam.conf -nt /var/run/snortsam.pid && echo reload
+ test /etc/snortsam.conf -nt /var/run/snortsam/snortsam.pid && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|