3 OSSEC_CONTROL="${DIRECTORY}/bin/ossec-control"
11 ebegin "Checking OSSEC Configuration"
17 CONFIGFILE="${CONFIGFILE:-${DIRECTORY}/etc/ossec.conf}"
18 if [ ! -r "${CONFIGFILE}" ]; then
19 eerror "Unable to read configuration file: ${CONFIGFILE}"
23 # Maybe put some kind of config file syntax checking in here? XML is a little different
29 checkconfig || return 1
30 ebegin "Starting ossec-hids"
31 ${OSSEC_CONTROL} start > /dev/null 2>&1
36 checkconfig || return 1
37 ebegin "Stopping ossec-hids"
38 ${OSSEC_CONTROL} stop > /dev/null 2>&1
43 if ! service_started "${myservice}" ; then
44 eerror "OSSEC is not running! Please start it before trying to reload it."
46 checkconfig || return 1
47 ebegin "Reloading ossec"
48 svc_stop ${OSSEC_CONTROL}
49 svc_start ${OSSEC_CONTROL}
55 checkconfig || return 1
56 ${OSSEC_CONTROL} status