new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / init / ossec-hids-debian.init
1 #!/bin/sh
2 # OSSEC         Controls OSSEC HIDS
3 # Author:       Daniel B. Cid <dcid@ossec.net>
4 # Modified for Debian by Michael Starks (patch by Costas Drogos)
5
6 ### BEGIN INIT INFO
7 # Provides:          ossec
8 # Required-Start:    $remote_fs $syslog
9 # Required-Stop:     $remote_fs $syslog
10 # Should-Start:      $network
11 # Should-Stop:       $network
12 # Default-Start:     2 3 4 5
13 # Default-Stop:      0 1 6
14 # Short-Description: Start and stop OSSEC HIDS
15 # Description:       Controls OSSEC HIDS daemons
16 #
17 ### END INIT INFO
18
19 . /etc/ossec-init.conf
20 if [ "X${DIRECTORY}" = "X" ]; then
21     DIRECTORY="/var/ossec"
22 fi
23
24 start() {
25     ${DIRECTORY}/bin/ossec-control start
26 }
27
28 stop() {
29     ${DIRECTORY}/bin/ossec-control stop
30 }
31
32 status() {
33     ${DIRECTORY}/bin/ossec-control status
34 }
35
36 case "$1" in
37 start)
38     start
39     ;;
40 stop)
41     stop
42     ;;
43 restart)
44     stop
45     start
46     ;;
47 status)
48     status
49     ;;
50 *)
51     echo "*** Usage: $0 {start|stop|restart|status}"
52     exit 1
53 esac