Added files dir from previous versions.
This commit is contained in:
parent
88e5fb0a2d
commit
838abbee32
4 changed files with 61 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
# Config file for /etc/init.d/plex-media-server
|
||||
|
||||
PLEX_PIDFILE="/var/run/plex-media-server.pid"
|
||||
PLEX_OUTLOG="/var/log/pms/out.log"
|
||||
PLEX_ERRLOG="/var/log/pms/err.log"
|
||||
PLEX_USER="plex"
|
||||
PLEX_SCRIPT="/usr/sbin/start_pms"
|
20
media-tv/plex-media-server/files/init.d/plex-media-server
Executable file
20
media-tv/plex-media-server/files/init.d/plex-media-server
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
depend() {
|
||||
need avahi-daemon
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Plex Media Server"
|
||||
start-stop-daemon -S -m -p ${PLEX_PIDFILE} -1 ${PLEX_OUTLOG} -2 ${PLEX_ERRLOG} --quiet -u ${PLEX_USER} -N -5 -b --exec ${PLEX_SCRIPT}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Plex Media Server"
|
||||
kill -- -`cat ${PLEX_PIDFILE}`
|
||||
|
||||
# Remove stale pid file since this is a dirty solution
|
||||
rm ${PLEX_PIDFILE}
|
||||
eend $?
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Plex Media Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=plex
|
||||
ExecStart=/usr/sbin/start_pms
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
23
media-tv/plex-media-server/files/virtualenv_start_pms.patch
Normal file
23
media-tv/plex-media-server/files/virtualenv_start_pms.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- a/usr/sbin/start_pms 2017-03-01 13:35:28.340489280 -0500
|
||||
+++ b/usr/sbin/start_pms 2017-03-01 13:36:05.574540305 -0500
|
||||
@@ -8,16 +8,20 @@
|
||||
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
|
||||
if [ -f /etc/default/locale ]; then
|
||||
export LANG="`cat /etc/default/locale|awk -F '=' '/LANG=/{print $2}'|sed 's/"//g'`"
|
||||
export LC_ALL="$LANG"
|
||||
fi
|
||||
|
||||
test -f /etc/default/plexmediaserver && . /etc/default/plexmediaserver
|
||||
|
||||
+# Activate python virtualenv
|
||||
+. "${PLEX_MEDIA_SERVER_HOME}"/Resources/Python/bin/activate
|
||||
+
|
||||
+
|
||||
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ]
|
||||
then
|
||||
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
|
||||
if [ ! $? -eq 0 ]
|
||||
then
|
||||
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue