pandora/ctl

15 lines
315 B
Text
Raw Normal View History

#!/bin/sh
if [ -z "$1" ]; then
2013-04-28 02:24:19 +00:00
echo "Usage: $0 (start|stop|restart|reload)"
exit 1
else
action="$1"
fi
2013-04-28 02:24:19 +00:00
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