blob: 0a3c2eaf5ab84dc34a473b8a940c43ee89f0c042 (
plain)
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
|
#!/bin/sh
NAME=monit
ENABLED=yes
[ -f /etc/default/$NAME ] && . /etc/default/$NAME
if [ "$ENABLED" != "yes" ]; then
echo "$NAME: disabled in /etc/default"
exit
fi
case $1 in
start)
echo "Starting monit"
monit
;;
stop)
echo "Stopping monit"
monit quit
;;
restart)
echo "Stopping monit"
monit quit
echo "Starting monit"
monit
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 2
;;
esac
|