Merge branch '2.3.x' into 2.3.x-saas
This commit is contained in:
commit
10fb9c9165
8 changed files with 20 additions and 12 deletions
|
@ -15,6 +15,7 @@ NAME="Liquidsoap Playout Engine"
|
|||
|
||||
DAEMON=/usr/lib/airtime/pypo/bin/airtime-liquidsoap
|
||||
PIDFILE=/var/run/airtime-liquidsoap.pid
|
||||
EXEC='/usr/bin/airtime-liquidsoap'
|
||||
|
||||
start () {
|
||||
chown pypo:pypo /var/log/airtime/pypo
|
||||
|
@ -24,8 +25,10 @@ start () {
|
|||
touch $PIDFILE
|
||||
chown pypo:pypo $PIDFILE
|
||||
|
||||
#start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
|
||||
#--pidfile $PIDFILE --nicelevel -15 --startas $DAEMON
|
||||
start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
|
||||
--pidfile $PIDFILE --nicelevel -15 --startas $DAEMON
|
||||
--nicelevel -15 --startas $DAEMON --exec $EXEC
|
||||
}
|
||||
|
||||
stop () {
|
||||
|
@ -33,9 +36,11 @@ stop () {
|
|||
timeout -s9 10s /usr/lib/airtime/airtime_virtualenv/bin/python \
|
||||
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
|
||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
|
||||
#start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
|
||||
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --exec $EXEC
|
||||
|
||||
rm -f $PIDFILE
|
||||
sleep 3
|
||||
sleep 2
|
||||
}
|
||||
|
||||
start_with_monit () {
|
||||
|
|
|
@ -192,6 +192,7 @@ def check_dj_client(user,password) =
|
|||
ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --dj #{user} #{password}")
|
||||
#ret has now the value of the live client (dj1,dj2, or djx), or "ERROR"/"unknown" ...
|
||||
hd = list.hd(ret)
|
||||
log("Live DJ authenticated: #{hd}")
|
||||
hd == "True"
|
||||
end
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
set httpd port 2812
|
||||
|
||||
check process airtime-liquidsoap
|
||||
with pidfile "/var/run/airtime-liquidsoap.pid"
|
||||
check process airtime-liquidsoap matching "airtime-liquidsoap.*airtime.*ls_script"
|
||||
start program = "/etc/init.d/airtime-liquidsoap start" with timeout 30 seconds
|
||||
stop program = "/etc/init.d/airtime-liquidsoap stop"
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ class PypoFetch(Thread):
|
|||
tn.write('exit\n')
|
||||
tn.read_all()
|
||||
except Exception, e:
|
||||
logger.error(str(e))
|
||||
logger.error(traceback.format_exc())
|
||||
finally:
|
||||
lock.release()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue