summaryrefslogtreecommitdiff
path: root/multimedia/plexmediaserver/rc.plexmediaserver
diff options
context:
space:
mode:
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}"