-
Notifications
You must be signed in to change notification settings - Fork 696
/
Copy pathossec
executable file
·61 lines (51 loc) · 1.01 KB
/
ossec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
# OSSEC Controls OSSEC HIDS
# Author: Daniel B. Cid <dcid@ossec.net>
# Modified for slackware by Jack S. Lai
# Modified for securedrop by James Dolan
### BEGIN INIT INFO
# Provides: SecureDrop App Server's OSSEC agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
. /lib/lsb/init-functions
. /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
;;
force-reload)
stop
start
;;
*)
echo "*** Usage: $0 {start|stop|restart|status|force-reload}"
exit 1
esac
exit 0