add option to pass action to reload, i.e. restart/stop/start

This commit is contained in:
j 2013-04-21 15:59:18 +00:00
parent e7c1813e97
commit a6b232b702
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@ if [ `whoami` != 'root' ]; then
echo you have to be root or run with sudo
exit 1
fi
if [ -z "$1" ]; then
action=reload
else
action="$1"
fi
for service in pandora pandora-tasks pandora-encoding pandora-cron; do
service $service reload
service $service $action
done