X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Finit%2Fossec-hids-suse.init;h=7b628b51d604a4b68fa83e94da39303a3b58981f;hp=ce51d1ca52d6b21a816060d76e6bf4b6e3346903;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/init/ossec-hids-suse.init b/src/init/ossec-hids-suse.init index ce51d1c..7b628b5 100755 --- a/src/init/ossec-hids-suse.init +++ b/src/init/ossec-hids-suse.init @@ -36,7 +36,7 @@ rc_reset # 5 - program is not installed # 6 - program is not configured # 7 - program is not running -# +# # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signalling is not supported) are @@ -47,7 +47,7 @@ rc_reset if [ -f /etc/ossec-init.conf ]; then . /etc/ossec-init.conf fi - + if [ "X${DIRECTORY}" = "X" ]; then DIRECTORY="/var/ossec" fi @@ -56,41 +56,39 @@ fi #Just to make sure ossec is installed ... CONTROL="$DIRECTORY/bin/ossec-control" -test -x $CONTROL || { echo "$CONTROL not installed"; +test -x $CONTROL || { echo "$CONTROL not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } - - + start() { - ${DIRECTORY}/bin/ossec-control start + ${DIRECTORY}/bin/ossec-control start } stop() { - ${DIRECTORY}/bin/ossec-control stop + ${DIRECTORY}/bin/ossec-control stop } status() { - ${DIRECTORY}/bin/ossec-control status + ${DIRECTORY}/bin/ossec-control status } - case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - status) +start) + start + ;; +stop) + stop + ;; +restart) + stop + start + ;; +status) status - ;; - *) - echo "*** Usage: $0 {start|stop|restart|status}" - exit 1 + ;; +*) + echo "*** Usage: $0 {start|stop|restart|status}" + exit 1 esac exit 0