Merge branch '2.0.x' into devel
Conflicts: VERSION airtime_mvc/application/models/Systemstatus.php install_minimal/include/airtime-constants.php install_minimal/include/airtime-upgrade.php python_apps/api_clients/api_client.py python_apps/media-monitor/install/media-monitor-copy-files.py python_apps/media-monitor/install/media-monitor-initialize.py python_apps/pypo/install/pypo-initialize.py python_apps/pypo/liquidsoap_bin python_apps/pypo/pypopush.py utils/airtime-log.php
This commit is contained in:
commit
f96b990275
23 changed files with 121 additions and 30 deletions
|
@ -669,4 +669,4 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
logger.error('Exception: %s', e)
|
||||
logger.error("traceback: %s", top)
|
||||
return response
|
||||
|
||||
|
||||
|
|
|
@ -11,13 +11,7 @@ def create_user(username):
|
|||
if (output[0:3] != "uid"):
|
||||
# Make the pypo user
|
||||
print " * Creating user "+username
|
||||
os.system("adduser --system --quiet --group --shell /bin/bash "+username)
|
||||
|
||||
#set pypo password
|
||||
p = os.popen('/usr/bin/passwd pypo 1>/dev/null 2>&1', 'w')
|
||||
p.write('pypo\n')
|
||||
p.write('pypo\n')
|
||||
p.close()
|
||||
os.system("adduser --system --quiet --group "+username)
|
||||
else:
|
||||
print "User already exists."
|
||||
#add pypo to audio group
|
||||
|
|
|
@ -50,7 +50,6 @@ try:
|
|||
#copy monit files
|
||||
shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True)
|
||||
|
||||
shutil.copy('%s/../monit-airtime-media-monitor.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
#create log dir
|
||||
|
|
|
@ -9,7 +9,7 @@ if os.geteuid() != 0:
|
|||
try:
|
||||
print "Waiting for media-monitor processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-media-monitor')):
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||
p = Popen("invoke-rc.d airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
print "OK"
|
||||
else:
|
||||
|
|
|
@ -29,7 +29,7 @@ try:
|
|||
print 'Error loading config file: ', e
|
||||
sys.exit(1)
|
||||
|
||||
os.system("/etc/init.d/airtime-media-monitor stop")
|
||||
os.system("invoke-rc.d airtime-media-monitor stop")
|
||||
os.system("rm -f /etc/init.d/airtime-media-monitor")
|
||||
os.system("update-rc.d -f airtime-media-monitor remove >/dev/null 2>&1")
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ def create_dir(path):
|
|||
os.makedirs(path)
|
||||
except Exception, e:
|
||||
pass
|
||||
|
||||
def get_rand_string(length=10):
|
||||
return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(length))
|
||||
|
||||
def get_rand_string(length=10):
|
||||
return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(length))
|
||||
|
|
|
@ -224,10 +224,6 @@ class PypoPush(Thread):
|
|||
problem_start_time = queue_item['start']
|
||||
break
|
||||
iteration+=1
|
||||
|
||||
|
||||
|
||||
|
||||
return (problem_at_iteration, problem_start_time)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue