-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 / [email protected] | ||
# Version: 1.0 | ||
# Rewamped Christian Svedin / [email protected] | ||
# 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` | ||
|
||
|
@@ -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" | ||
;; | ||
|
@@ -59,4 +61,4 @@ case "$1" in | |
;; | ||
esac | ||
|
||
exit 0 | ||
exit 0 |