Blame | Last modification | View Log | RSS feed
#!/bin/sh# OSSEC Controls OSSEC HIDS on Redhat-based systems# Author: Kayvan A. Sylvan <kayvan@sylvan.com># Author: Daniel B. Cid <dcid@ossec.net>## chkconfig: 2345 99 15# description: Starts and stops OSSEC HIDS (Host Intrusion Detection System)## This will work on Redhat systems (maybe others too)# Source function library.export LANG=C. /etc/init.d/functions. /etc/ossec-init.confif [ "X${DIRECTORY}" = "X" ]; thenDIRECTORY="/var/ossec"fistart() {echo -n "Starting OSSEC: "${DIRECTORY}/bin/ossec-control start > /dev/nullRETVAL=$?if [ $RETVAL -eq 0 ]; thensuccesselsefailurefiechoreturn $RETVAL}stop() {echo -n "Stopping OSSEC: "${DIRECTORY}/bin/ossec-control stop > /dev/nullRETVAL=$?if [ $RETVAL -eq 0 ]; thensuccesselsefailurefiechoreturn $RETVAL}status() {${DIRECTORY}/bin/ossec-control status}case "$1" instart)start;;stop)stop;;restart)stopstart;;status)status;;*)echo "*** Usage: ossec {start|stop|restart|status}"exit 1esacexit $?