Fix bug where users can't connect to Master source due to hardcoded path in liquidsoap
This commit is contained in:
parent
2f20729e05
commit
196e08fc90
2 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
|
@ -23,7 +24,9 @@ def generate_liquidsoap_config(ss):
|
|||
str_buffer = "%s = %s\n" % (key, val)
|
||||
fh.write(str_buffer.encode('utf-8'))
|
||||
|
||||
auth_path = os.path.dirname(os.path.realpath(__file__))
|
||||
fh.write('log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log"\n')
|
||||
fh.write('auth_path = "%s/liquidsoap_auth.py"\n' % auth_path)
|
||||
fh.close()
|
||||
|
||||
def run():
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
set("log.file.path", log_file)
|
||||
set("server.telnet", true)
|
||||
set("server.telnet.port", 1234)
|
||||
set("init.daemon.pidfile.path", "/var/run/airtime/airtime-liquidsoap.pid")
|
||||
# set("init.daemon.pidfile.path", "/var/run/airtime/airtime-liquidsoap.pid")
|
||||
|
||||
%include "library/pervasives.liq"
|
||||
|
||||
|
@ -213,7 +213,7 @@ end
|
|||
def check_master_dj_client(user,password) =
|
||||
log("master connected")
|
||||
#get the output of the php script
|
||||
ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --master #{user} #{password}")
|
||||
ret = get_process_lines("python #{auth_path} --master #{user} #{password}")
|
||||
#ret has now the value of the live client (dj1,dj2, or djx), or "ERROR"/"unknown" ...
|
||||
ret = list.hd(ret)
|
||||
|
||||
|
@ -224,7 +224,7 @@ end
|
|||
def check_dj_client(user,password) =
|
||||
log("live dj connected")
|
||||
#get the output of the php script
|
||||
ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --dj #{user} #{password}")
|
||||
ret = get_process_lines("python #{auth_path} --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}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue