2 # OSSEC Controls OSSEC HIDS on Redhat-based systems
3 # Author: Kayvan A. Sylvan <kayvan@sylvan.com>
4 # Author: Daniel B. Cid <dcid@ossec.net>
6 # chkconfig: 2345 99 15
7 # description: Starts and stops OSSEC HIDS (Host Intrusion Detection System)
9 # This will work on Redhat systems (maybe others too)
11 # Source function library.
14 . /etc/init.d/functions
15 . /etc/ossec-init.conf
17 if [ "X${DIRECTORY}" = "X" ]; then
18 DIRECTORY="/var/ossec"
22 echo -n "Starting OSSEC: "
23 ${DIRECTORY}/bin/ossec-control start > /dev/null
25 if [ $RETVAL -eq 0 ]; then
35 echo -n "Stopping OSSEC: "
36 ${DIRECTORY}/bin/ossec-control stop > /dev/null
38 if [ $RETVAL -eq 0 ]; then
48 ${DIRECTORY}/bin/ossec-control status
67 echo "*** Usage: ossec {start|stop|restart|status}"