Skip to content

Commit

Permalink
update to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tripflex committed Jun 16, 2014
1 parent af76adc commit 783b94a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions plexmediaserver
@@ -1,21 +1,23 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: plexmediaserver
# Required-Start: $remote_fs $syslog $all
# Required-Start: $remote_fs $syslog $networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Plex Media Server
# Description: Plex Media Server for Linux,
# More information at http://www.plexapp.com
# Many thanks to the great PlexApp team for his wonderfull job !
# Many thanks to the great PlexApp team for their wonderfull job !
# Author: Cedric Quillevere / origin@killy.net
# Version: 1.0
# Rewamped Christian Svedin / christian.svedin@gmail.com
# Version: 1.2
### END INIT INFO

#test -f "/usr/lib/plexmediaserver/Plex Media Server" || exit 0
test -f "/usr/lib/plexmediaserver/start.sh" || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/plexmediaserver ] && . /etc/default/plexmediaserver

export PMS_RUN_USER="plex"
test -f "/usr/lib/plexmediaserver/start.sh" || exit 0

plex_running=`ps ax | grep "\./Plex Media Server" | awk '{ print $1 }' | wc -l`

Expand All @@ -26,7 +28,7 @@ case "$1" in
exit 0
fi
echo -n "Starting Plex Media Server: "
su -l $PMS_RUN_USER -c "/usr/sbin/start_pms &" >/dev/null 2>&1
su -l $PLEX_MEDIA_SERVER_USER -c "/usr/sbin/start_pms &" >/dev/null 2>&1
sleep 1
echo "done"
;;
Expand Down Expand Up @@ -59,4 +61,4 @@ case "$1" in
;;
esac

exit 0
exit 0

0 comments on commit 783b94a

Please sign in to comment.