]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
committing changes in /etc after emerge run
authorFrank Brehm <frank@brehm-online.com>
Tue, 7 Nov 2017 21:12:32 +0000 (22:12 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 7 Nov 2017 21:12:32 +0000 (22:12 +0100)
Package changes:
+media-tv/plex-media-server-1.8.1

conf.d/plex-media-server [new file with mode: 0644]
env.d/66plex [new file with mode: 0644]
init.d/plex-media-server [new file with mode: 0755]
plex/plexmediaserver [new file with mode: 0644]

diff --git a/conf.d/plex-media-server b/conf.d/plex-media-server
new file mode 100644 (file)
index 0000000..7fe754f
--- /dev/null
@@ -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"
diff --git a/env.d/66plex b/env.d/66plex
new file mode 100644 (file)
index 0000000..f3056c0
--- /dev/null
@@ -0,0 +1 @@
+LDPATH="/usr/lib64/plexmediaserver"
diff --git a/init.d/plex-media-server b/init.d/plex-media-server
new file mode 100755 (executable)
index 0000000..102ac80
--- /dev/null
@@ -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 $?
+}
diff --git a/plex/plexmediaserver b/plex/plexmediaserver
new file mode 100644 (file)
index 0000000..51709fc
--- /dev/null
@@ -0,0 +1,23 @@
+# default script for Plex Media Server
+
+# the number of plugins that can run at the same time
+export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
+
+# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
+export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
+
+# where the mediaserver should store the transcodes
+export PLEX_MEDIA_SERVER_TMPDIR=/tmp
+
+# uncomment to set it to something else
+# export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
+
+# the user that PMS should run as, defaults to 'plex'
+# note that if you change this you might need to move
+# the Application Support directory to not lose your
+# media library (match what is in /etc/passwd)
+export PLEX_MEDIA_SERVER_USER=plex
+
+# Uncomment this to use syslog for logging instead of
+# sending logs to Plex Media Server.log
+#export PLEX_MEDIA_SERVER_USE_SYSLOG=true