From 03bebfd623284653966955748a63e75ed4083003 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 28 Apr 2013 02:24:19 +0000 Subject: [PATCH] rename reload.sh to ctl, fixes #1487 --- reload.sh => ctl | 11 ++++++----- etc/logrotate.d/pandora | 5 +---- update.py | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) rename reload.sh => ctl (65%) diff --git a/reload.sh b/ctl similarity index 65% rename from reload.sh rename to ctl index c5943b9f9..6b38ccf97 100755 --- a/reload.sh +++ b/ctl @@ -1,13 +1,14 @@ #!/bin/sh -if [ `whoami` != 'root' ]; then - echo you have to be root or run with sudo - exit 1 -fi if [ -z "$1" ]; then - action=reload + echo "Usage: $0 (start|stop|restart|reload)" + exit 1 else action="$1" fi +if [ `whoami` != 'root' ]; then + echo you have to be root or run $0 with sudo + exit 1 +fi for service in pandora pandora-tasks pandora-encoding pandora-cron; do service $service $action done diff --git a/etc/logrotate.d/pandora b/etc/logrotate.d/pandora index 31d2f4f4c..e4789a611 100644 --- a/etc/logrotate.d/pandora +++ b/etc/logrotate.d/pandora @@ -8,9 +8,6 @@ create 0640 pandora pandora sharedscripts postrotate - service pandora reload - service pandora-tasks reload - service pandora-encoding reload - service pandora-cron reload + /srv/pandora/ctl reload endscript } diff --git a/update.py b/update.py index 33fec2ece..b210179de 100755 --- a/update.py +++ b/update.py @@ -52,7 +52,7 @@ repos = { } def reload_notice(base): - print '\nYou might need to restart pandora to finish the update:\n\t"sudo %s/reload.sh"\n' % base + print '\nYou might need to restart pandora to finish the update:\n\t"sudo %s/ctl reload"\n' % base if __name__ == "__main__": base = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))