parent
7e7f8147da
commit
a6eb74b1fd
|
@ -10,6 +10,7 @@
|
|||
### END INIT INFO
|
||||
|
||||
USERID=pypo
|
||||
ROOTUSERID=root
|
||||
GROUPID=pypo
|
||||
NAME=Airtime\ Playout
|
||||
|
||||
|
@ -47,7 +48,7 @@ start () {
|
|||
chown pypo:pypo /etc/airtime
|
||||
chown pypo:pypo /etc/airtime/liquidsoap.cfg
|
||||
|
||||
start-stop-daemon --start --background --quiet --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||
start-stop-daemon --start --background --quiet --chuid $ROOTUSERID:$ROOTUSERID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||
monit monitor airtime-playout >/dev/null 2>&1
|
||||
|
||||
liquidsoap_start
|
||||
|
@ -80,7 +81,7 @@ monit_restart() {
|
|||
}
|
||||
|
||||
start_no_monit() {
|
||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||
start-stop-daemon --start --background --quiet --chuid $ROOTUSERID:$ROOTUSERID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||
liquidsoap_start
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import logging.config
|
|||
import shutil
|
||||
import os
|
||||
import sys
|
||||
import stat
|
||||
|
||||
from std_err_override import LogWriter
|
||||
|
||||
|
@ -74,8 +75,12 @@ class PypoFile(Thread):
|
|||
copy will overwrite dst if it already exists
|
||||
"""
|
||||
shutil.copy(src, dst)
|
||||
except:
|
||||
|
||||
#make file world readable
|
||||
os.chmod(dst, stat.S_IRUSR | stat.S_IRGRP | stat.S_IXOTH)
|
||||
except Exception, e:
|
||||
self.logger.error("Could not copy from %s to %s" % (src, dst))
|
||||
self.logger.error(e)
|
||||
|
||||
def get_highest_priority_media_item(self, schedule):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue