CC-5986 - Fixed unit tests, removed unnecessary code from service execution files
This commit is contained in:
parent
875a9dfd8b
commit
bc604b992e
11 changed files with 424 additions and 41 deletions
|
@ -1,15 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec 2>&1
|
||||
|
||||
set +e
|
||||
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8"
|
||||
set -e
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "non UTF-8 default locale found in /etc/default/locale." > /var/log/airtime/media-monitor/error.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
|
||||
|
||||
exec python -m media_monitor > /var/log/airtime/media-monitor/py-interpreter.log 2>&1
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
import logging
|
||||
import locale
|
||||
import time
|
||||
import sys
|
||||
import os
|
||||
import mm2.mm2 as mm2
|
||||
from std_err_override import LogWriter
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
global_cfg = '/etc/airtime/airtime.conf'
|
||||
logging_cfg = os.path.join(os.path.dirname(__file__), 'logging.cfg')
|
||||
def run():
|
||||
global_cfg = '/etc/airtime/airtime.conf'
|
||||
logging_cfg = os.path.join(os.path.dirname(__file__), 'logging.cfg')
|
||||
|
||||
mm2.main( global_cfg, logging_cfg )
|
||||
|
||||
mm2.main( global_cfg, logging_cfg )
|
||||
run()
|
|
@ -1,15 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8" > /dev/null
|
||||
set -e
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "non UTF-8 default locale found in /etc/default/locale." > /var/log/airtime/pypo/error.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export HOME="/var/tmp/airtime/pypo/"
|
||||
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
|
||||
export TERM=xterm
|
||||
|
||||
exec python -m pypo > /var/log/airtime/pypo/py-interpreter.log 2>&1
|
||||
|
|
|
@ -76,9 +76,16 @@ parser.add_option("-c",
|
|||
|
||||
LIQUIDSOAP_MIN_VERSION = "1.1.1"
|
||||
|
||||
PYPO_HOME='/var/tmp/airtime/pypo/'
|
||||
|
||||
#need to wait for Python 2.7 for this..
|
||||
#logging.captureWarnings(True)
|
||||
def configure_environment():
|
||||
os.environ["HOME"] = PYPO_HOME
|
||||
os.environ["TERM"] = 'xterm'
|
||||
|
||||
configure_environment()
|
||||
|
||||
# need to wait for Python 2.7 for this..
|
||||
logging.captureWarnings(True)
|
||||
|
||||
# configure logging
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue