From 16c241ec405d009c263151b1f6ffe2d9513f93cf Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 7 Nov 2017 22:12:32 +0100 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +media-tv/plex-media-server-1.8.1 --- conf.d/plex-media-server | 7 +++++++ env.d/66plex | 1 + init.d/plex-media-server | 20 ++++++++++++++++++++ plex/plexmediaserver | 23 +++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 conf.d/plex-media-server create mode 100644 env.d/66plex create mode 100755 init.d/plex-media-server create mode 100644 plex/plexmediaserver diff --git a/conf.d/plex-media-server b/conf.d/plex-media-server new file mode 100644 index 00000000..7fe754fb --- /dev/null +++ b/conf.d/plex-media-server @@ -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 index 00000000..f3056c0a --- /dev/null +++ b/env.d/66plex @@ -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 index 00000000..102ac80c --- /dev/null +++ b/init.d/plex-media-server @@ -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 index 00000000..51709fc8 --- /dev/null +++ b/plex/plexmediaserver @@ -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 -- 2.39.5