cc-2055: switch to init.d
-Change all python apps to log directly to file -change airtime-pypo to airtime-playback -fix airtime install started/completed message bumpers
This commit is contained in:
parent
c05c2f1e28
commit
79e24e5af5
26 changed files with 75 additions and 269 deletions
49
python_apps/pypo/airtime-playout-init-d
Executable file
49
python_apps/pypo/airtime-playout-init-d
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
USERID=pypo
|
||||
GROUPID=pypo
|
||||
NAME=Airtime
|
||||
|
||||
DAEMON=/usr/bin/airtime-playout
|
||||
PIDFILE=/var/run/airtime.pid
|
||||
|
||||
start () {
|
||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
|
||||
}
|
||||
|
||||
stop () {
|
||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
|
||||
rm -f $PIDFILE
|
||||
}
|
||||
|
||||
|
||||
case "${1:-''}" in
|
||||
'start')
|
||||
# start commands here
|
||||
echo -n "Starting $NAME: "
|
||||
start
|
||||
echo "Done."
|
||||
;;
|
||||
'stop')
|
||||
# stop commands here
|
||||
echo -n "Stopping $NAME: "
|
||||
stop
|
||||
echo "Done."
|
||||
;;
|
||||
'restart')
|
||||
# restart commands here
|
||||
echo -n "Restarting $NAME: "
|
||||
stop
|
||||
start
|
||||
echo "Done."
|
||||
;;
|
||||
'status')
|
||||
# status commands here
|
||||
/usr/bin/airtime-check-system
|
||||
;;
|
||||
*) # no parameter specified
|
||||
echo "Usage: $SELF start|stop|restart|status"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue