CC-2750: Ability to query health status for pypo, liquidsoap, media monitor, and recorder

This commit is contained in:
martin 2011-09-28 12:15:13 -04:00
parent 5418ce4601
commit 1cbc098e91
7 changed files with 45 additions and 10 deletions

View file

@ -28,6 +28,10 @@ stop () {
rm -f $PIDFILE
}
start_no_monit() {
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
}
case "${1:-''}" in
'start')
@ -49,6 +53,12 @@ case "${1:-''}" in
start
echo "Done."
;;
'start-no-monit')
# restart commands here
echo -n "Starting $NAME: "
start_no_monit
echo "Done."
;;
'status')
# status commands here
/usr/bin/airtime-check-system

View file

@ -78,7 +78,7 @@ try:
sts = os.waitpid(p.pid, 0)[1]
print "Waiting for processes to start..."
p = Popen("/etc/init.d/airtime-media-monitor start", shell=True)
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]
except Exception, e:

View file

@ -66,6 +66,11 @@ monit_restart() {
}
start_no_monit() {
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
liquidsoap_start
}
case "${1:-''}" in
'start')
# start commands here
@ -86,6 +91,12 @@ case "${1:-''}" in
start
echo "Done."
;;
'start-no-monit')
# restart commands here
echo -n "Starting $NAME: "
start_no_monit
echo "Done."
;;
'monit-restart')
# restart commands here
echo -n "Monit Restarting $NAME: "

View file

@ -153,7 +153,7 @@ try:
else:
print "Unable to connect to the Airtime server."
print "Waiting for processes to start..."
p = Popen("/etc/init.d/airtime-playout start", shell=True)
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]

View file

@ -29,6 +29,10 @@ stop () {
rm -f $PIDFILE
}
start_no_monit() {
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
}
case "${1:-''}" in
'start')
@ -50,6 +54,12 @@ case "${1:-''}" in
start
echo "Done."
;;
'start-no-monit')
# restart commands here
echo -n "Starting $NAME: "
start_no_monit
echo "Done."
;;
'status')
# status commands here
/usr/bin/airtime-check-system

View file

@ -75,7 +75,7 @@ try:
sts = os.waitpid(p.pid, 0)[1]
print "Waiting for processes to start..."
p = Popen("/etc/init.d/airtime-show-recorder start", shell=True)
p = Popen("/etc/init.d/airtime-show-recorder start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]
except Exception, e: