From 379e70ff237757fabae8e19000722b706d22085d Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 14 Apr 2011 17:16:50 -0400 Subject: [PATCH] CC-2169 : All logging should go to /var/log pypo-liquidsoap log now in its folder --- python_apps/pypo/install/pypo-install.py | 6 +++++- .../pypo/install/pypo-liquidsoap-daemontools-logger.sh | 2 ++ python_apps/pypo/install/pypo-uninstall.py | 1 + python_apps/pypo/scripts/liquidsoap.cfg | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 python_apps/pypo/install/pypo-liquidsoap-daemontools-logger.sh diff --git a/python_apps/pypo/install/pypo-install.py b/python_apps/pypo/install/pypo-install.py index 5a49f3205..66d94fcc5 100755 --- a/python_apps/pypo/install/pypo-install.py +++ b/python_apps/pypo/install/pypo-install.py @@ -76,6 +76,10 @@ try: os.system("chmod -R 755 /var/log/airtime/pypo") os.system("chown -R pypo:pypo /var/log/airtime/pypo") + create_path("/var/log/airtime/pypo-liquidsoap") + os.system("chmod -R 755 /var/log/airtime/pypo-liquidsoap") + os.system("chown -R pypo:pypo /var/log/airtime/pypo-liquidsoap") + create_path(BASE_PATH) create_path(BASE_PATH+"bin") create_path(BASE_PATH+"cache") @@ -112,7 +116,7 @@ try: create_path("/etc/service/pypo-liquidsoap") create_path("/etc/service/pypo-liquidsoap/log") shutil.copy("%s/pypo-daemontools-liquidsoap.sh"%current_script_dir, "/etc/service/pypo-liquidsoap/run") - shutil.copy("%s/pypo-daemontools-logger.sh"%current_script_dir, "/etc/service/pypo-liquidsoap/log/run") + shutil.copy("%s/pypo-liquidsoap-daemontools-logger.sh"%current_script_dir, "/etc/service/pypo-liquidsoap/log/run") os.system("chmod -R 755 /etc/service/pypo-liquidsoap") os.system("chown -R pypo:pypo /etc/service/pypo-liquidsoap") diff --git a/python_apps/pypo/install/pypo-liquidsoap-daemontools-logger.sh b/python_apps/pypo/install/pypo-liquidsoap-daemontools-logger.sh new file mode 100644 index 000000000..98ac88c3b --- /dev/null +++ b/python_apps/pypo/install/pypo-liquidsoap-daemontools-logger.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec setuidgid pypo multilog t /var/log/airtime/pypo-liquidsoap/main diff --git a/python_apps/pypo/install/pypo-uninstall.py b/python_apps/pypo/install/pypo-uninstall.py index 36ffd2370..004556bf0 100755 --- a/python_apps/pypo/install/pypo-uninstall.py +++ b/python_apps/pypo/install/pypo-uninstall.py @@ -33,6 +33,7 @@ try: print "Removing log directories" remove_path("/var/log/airtime/pypo") + remove_path("/var/log/airtime/pypo-liquidsoap") print "Removing pypo files" remove_path(BASE_PATH) diff --git a/python_apps/pypo/scripts/liquidsoap.cfg b/python_apps/pypo/scripts/liquidsoap.cfg index a7f310f1a..467ece4d1 100644 --- a/python_apps/pypo/scripts/liquidsoap.cfg +++ b/python_apps/pypo/scripts/liquidsoap.cfg @@ -7,7 +7,7 @@ # general settings # ########################################### -log_file = "/var/log/pypo/