"templates/check_application.yaml" did not exist on "ac08b5f2095711f1d4df997327921dabaa0b3d97"
Newer
Older

jurgenhaas
committed
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
#!/bin/sh
### BEGIN INIT INFO
# Provides: elastalert
# Short-Description: Start and stop ElastAlert
# Description: ElastAlert
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
export HOME=/root
# Action to take
case "$1" in
start)
echo "Starting ElastAlert ..."
cd /opt/elastalert
/usr/local/bin/elastalert &
exit 0
;;
stop)
echo "Stoping ElastAlert ..."
kill `pidof /usr/bin/python /usr/local/bin/elastalert` && echo "ElastAlert stopped"
exit 0
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: service elastalert {start|stop|restart}"
exit 1
;;
esac
exit $?