3 PLEX_MEDIA_SERVER_USER
=root
5 .
/etc
/conf.d
/plexmediaserver
7 export PLEX_MEDIA_SERVER_HOME
=/usr
/lib
/plexmediaserver
8 export LD_LIBRARY_PATH
="${PLEX_MEDIA_SERVER_HOME}"
9 export TMPDIR
="${PLEX_MEDIA_SERVER_TMPDIR}"
14 PID
=`pidof -o %PPID /usr/lib/plexmediaserver/Plex\ Media\ Server`
18 stat_busy
"Starting Plex Media Server"
19 [ -z "$PID" ] && su
-c " /usr/lib/plexmediaserver/Plex\ Media\ Server > /var/log/plexmediaserver.log &" $PLEX_MEDIA_SERVER_USER
23 add_daemon plexmediaserver
28 stat_busy
"Stopping Plex Media Server"
29 [ ! -z "$PID" ] && kill $PID > /dev
/null
33 rm_daemon plexmediaserver
43 echo "usage: $0 {start|stop|restart}"