parent
3eafdeef5d
commit
b9c1f7356f
|
@ -28,7 +28,10 @@ try:
|
|||
if (len(liquidsoap_pid) > 0):
|
||||
os.system("svc -d /etc/service/pypo-liquidsoap 1>/dev/null 2>&1")
|
||||
os.system("svc -d /etc/service/pypo-liquidsoap/log 1>/dev/null 2>&1")
|
||||
os.system("kill -2 %s" % liquidsoap_pid)
|
||||
|
||||
pids = liquidsoap_pid.split("\n")
|
||||
for pid in pids:
|
||||
os.system("kill -2 %s" % pid)
|
||||
print "Success."
|
||||
else:
|
||||
print "Not Running."
|
||||
|
|
|
@ -10,6 +10,8 @@ exec 2>&1
|
|||
cd /usr/lib/airtime/pypo/bin/scripts
|
||||
|
||||
export PYTHONPATH=${api_client_path}
|
||||
su ${ls_user} -c "${ls_path} ${ls_param}"
|
||||
#su ${ls_user} -c "${ls_path} ${ls_param}" 2>&1
|
||||
|
||||
setuidgid ${ls_user} ${ls_path} ${ls_param}
|
||||
|
||||
# EOF
|
||||
|
|
|
@ -10,7 +10,7 @@ if os.geteuid() != 0:
|
|||
sys.exit(1)
|
||||
|
||||
try:
|
||||
print "Stopping daemontool script recorder"
|
||||
print "Stopping daemontool script recorder...",
|
||||
|
||||
p1 = subprocess.Popen(["ps", "aux"], stdout=subprocess.PIPE)
|
||||
p2 = subprocess.Popen(["awk", "/recorder.py/ && !/awk/ {print $2}"], stdin=p1.stdout, stdout=subprocess.PIPE)
|
||||
|
@ -18,7 +18,10 @@ try:
|
|||
if (len(recorder_pid) > 0):
|
||||
os.system("svc -d /etc/service/recorder 1>/dev/null 2>&1")
|
||||
os.system("svc -d /etc/service/recorder/log 1>/dev/null 2>&1")
|
||||
os.system("kill -2 %s" % recorder_pid)
|
||||
|
||||
pids = recorder_pid.split("\n")
|
||||
for pid in pids:
|
||||
os.system("kill -2 %s" % pid)
|
||||
print "Success."
|
||||
else:
|
||||
print "Not Running."
|
||||
|
|
|
@ -15,7 +15,9 @@ exec 2>&1
|
|||
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
||||
|
||||
export PYTHONPATH=${api_client_path}
|
||||
su ${recorder_user} -c "python -u ${recorder_path}${recorder_script}"
|
||||
#su ${recorder_user} -c "python -u ${recorder_path}${recorder_script}"
|
||||
|
||||
setuidgid ${recorder_user} ${recorder_path}${recorder_script}
|
||||
|
||||
|
||||
# EOF
|
||||
|
|
Loading…
Reference in New Issue