cc-2055: switch to init.d
-monit is now temporarily disabled when intentionally stopped a service
This commit is contained in:
parent
ec6db96025
commit
2f5a1c4df6
6 changed files with 31 additions and 4 deletions
|
@ -19,15 +19,22 @@ PIDFILE0=/var/run/airtime-playout.pid
|
|||
DAEMON1=/usr/lib/airtime/pypo/bin/airtime-liquidsoap
|
||||
PIDFILE1=/var/run/airtime-liquidsoap.pid
|
||||
|
||||
start () {
|
||||
start () {
|
||||
monit monitor airtime-playout
|
||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||
|
||||
monit monitor airtime-liquidsoap
|
||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE1 --startas $DAEMON1
|
||||
}
|
||||
|
||||
stop () {
|
||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||
|
||||
monit unmonitor airtime-playout
|
||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE0
|
||||
rm -f $PIDFILE0
|
||||
|
||||
monit unmonitor airtime-liquidsoap
|
||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
|
||||
rm -f $PIDFILE1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue