X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Finit%2Fossec-hids-debian.init;fp=src%2Finit%2Fossec-hids-debian.init;h=0e2554929f2b6ccb26be9c16f3a5488aa9698ff8;hp=0000000000000000000000000000000000000000;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/init/ossec-hids-debian.init b/src/init/ossec-hids-debian.init new file mode 100755 index 0000000..0e25549 --- /dev/null +++ b/src/init/ossec-hids-debian.init @@ -0,0 +1,57 @@ +#!/bin/sh +# OSSEC Controls OSSEC HIDS +# Author: Daniel B. Cid +# Modified for Debian by Michael Starks (patch by Costas Drogos) + +### BEGIN INIT INFO +# Provides: ossec +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop OSSEC HIDS +# Description: Controls OSSEC HIDS daemons +# +### END INIT INFO + +. /etc/ossec-init.conf +if [ "X${DIRECTORY}" = "X" ]; then + DIRECTORY="/var/ossec" +fi + + +start() { + ${DIRECTORY}/bin/ossec-control start +} + +stop() { + ${DIRECTORY}/bin/ossec-control stop +} + +status() { + ${DIRECTORY}/bin/ossec-control status +} + + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + status) + status + ;; + *) + echo "*** Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit 0