From e5f2e8d0446a3106adf8c9723a881d8f3f1a9d7f Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 14 Apr 2011 16:03:23 -0400 Subject: [PATCH 1/4] CC-2169 : All logging should go to /var/log moving pypo/recorder logs to folder /var/log/airtime --- python_apps/pypo/install/pypo-daemontools-logger.sh | 2 +- python_apps/pypo/install/pypo-install.py | 6 +++--- python_apps/pypo/install/pypo-uninstall.py | 2 +- .../show-recorder/install/recorder-daemontools-logger.sh | 2 +- python_apps/show-recorder/install/recorder-install.py | 6 +++--- python_apps/show-recorder/install/recorder-uninstall.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python_apps/pypo/install/pypo-daemontools-logger.sh b/python_apps/pypo/install/pypo-daemontools-logger.sh index 9673575db..249bfd78b 100755 --- a/python_apps/pypo/install/pypo-daemontools-logger.sh +++ b/python_apps/pypo/install/pypo-daemontools-logger.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec setuidgid pypo multilog t ./main +exec setuidgid pypo multilog t /var/log/airtime/pypo/main diff --git a/python_apps/pypo/install/pypo-install.py b/python_apps/pypo/install/pypo-install.py index 1171dfe23..5a49f3205 100755 --- a/python_apps/pypo/install/pypo-install.py +++ b/python_apps/pypo/install/pypo-install.py @@ -72,9 +72,9 @@ try: create_user("pypo") print "Creating log directories" - create_path("/var/log/pypo") - os.system("chmod -R 755 /var/log/pypo") - os.system("chown -R pypo:pypo /var/log/pypo") + create_path("/var/log/airtime/pypo") + os.system("chmod -R 755 /var/log/airtime/pypo") + os.system("chown -R pypo:pypo /var/log/airtime/pypo") create_path(BASE_PATH) create_path(BASE_PATH+"bin") diff --git a/python_apps/pypo/install/pypo-uninstall.py b/python_apps/pypo/install/pypo-uninstall.py index cd22e9c4c..36ffd2370 100755 --- a/python_apps/pypo/install/pypo-uninstall.py +++ b/python_apps/pypo/install/pypo-uninstall.py @@ -32,7 +32,7 @@ try: os.system("python %s/pypo-stop.py" % get_current_script_dir()) print "Removing log directories" - remove_path("/var/log/pypo") + remove_path("/var/log/airtime/pypo") print "Removing pypo files" remove_path(BASE_PATH) diff --git a/python_apps/show-recorder/install/recorder-daemontools-logger.sh b/python_apps/show-recorder/install/recorder-daemontools-logger.sh index 9673575db..7d53b9653 100644 --- a/python_apps/show-recorder/install/recorder-daemontools-logger.sh +++ b/python_apps/show-recorder/install/recorder-daemontools-logger.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec setuidgid pypo multilog t ./main +exec setuidgid pypo multilog t /var/log/airtime/recorder/main diff --git a/python_apps/show-recorder/install/recorder-install.py b/python_apps/show-recorder/install/recorder-install.py index 1b8186391..a3f2da526 100644 --- a/python_apps/show-recorder/install/recorder-install.py +++ b/python_apps/show-recorder/install/recorder-install.py @@ -80,9 +80,9 @@ try: os.system("chown -R pypo:pypo /home/pypo/Music") print "Creating log directories" - create_path("/var/log/recorder") - os.system("chmod -R 755 /var/log/recorder") - os.system("chown -R pypo:pypo /var/log/recorder") + create_path("/var/log/airtime/recorder") + os.system("chmod -R 755 /var/log/airtime/recorder") + os.system("chown -R pypo:pypo /var/log/airtime/recorder") create_path(BASE_PATH) create_path(BASE_PATH+"bin") diff --git a/python_apps/show-recorder/install/recorder-uninstall.py b/python_apps/show-recorder/install/recorder-uninstall.py index f8ab96432..5040ca8bd 100644 --- a/python_apps/show-recorder/install/recorder-uninstall.py +++ b/python_apps/show-recorder/install/recorder-uninstall.py @@ -32,7 +32,7 @@ try: os.system("python %s/recorder-stop.py" % get_current_script_dir()) print "Removing log directories" - remove_path("/var/log/recorder") + remove_path("/var/log/airtime/recorder") print "Removing recorder files" remove_path(BASE_PATH) From 379e70ff237757fabae8e19000722b706d22085d Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 14 Apr 2011 17:16:50 -0400 Subject: [PATCH 2/4] 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/