summaryrefslogtreecommitdiff
path: root/multimedia/plexmediaserver/rc.plexmediaserver
diff options
context:
space:
mode:
authorLionel Young <lionelyoung@gmail.com>2014-03-16 13:01:09 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-21 13:01:17 -0500
commit602e89befa4a334e294ece2568635c92ef3048f3 (patch)
tree40543b6fc436b9aee2417d0479564518d7b3a534 /multimedia/plexmediaserver/rc.plexmediaserver
parent84a92bd52e3823dcc8ac4135753983b806f6aa90 (diff)
downloadslackbuilds-602e89befa4a334e294ece2568635c92ef3048f3.tar.gz
multimedia/plexmediaserver: Updated for version 0.9.9.7.429_f80a8d6.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/plexmediaserver/rc.plexmediaserver')
-rw-r--r--multimedia/plexmediaserver/rc.plexmediaserver19
1 files changed, 6 insertions, 13 deletions
diff --git a/multimedia/plexmediaserver/rc.plexmediaserver b/multimedia/plexmediaserver/rc.plexmediaserver
index 93598b361c..94267a11ea 100644
--- a/multimedia/plexmediaserver/rc.plexmediaserver
+++ b/multimedia/plexmediaserver/rc.plexmediaserver
@@ -10,7 +10,7 @@ PIDFILE="/var/run/plexmediaserver.pid"
plexmediaserver_start() {
echo "Starting plexmediaserver..."
- CHECK=$(ps aux | grep /usr/bin/start_pms | grep -v grep)
+ CHECK=$(ps aux | grep "Plex Media Server" | grep -v grep)
STATUS=$?
# make sure plexmediaserver isn't running yet
@@ -30,16 +30,9 @@ plexmediaserver_start() {
plexmediaserver_stop() {
echo -n "Stopping plexmediaserver..."
- if [ -r $PIDFILE ]; then
- kill $(cat $PIDFILE)
- killall "Plex Media Server"
- rm $PIDFILE
- echo "done"
- else
- killall "Plex Media Server"
- rm $PIDFILE
- echo "done"
- fi
+ killall "Plex Media Server"
+ rm $PIDFILE
+ echo "done"
}
# Let's see how we are being called.
@@ -51,9 +44,9 @@ case "$1" in
plexmediaserver_stop
;;
restart)
- plexmediaserver_start
- sleep 3
plexmediaserver_stop
+ sleep 3
+ plexmediaserver_start
;;
*)
echo "Usage: $(basename $0) {start|stop|restart}"