summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-07-15 17:53:00 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-07-15 17:53:00 (GMT)
commit5cacb421450d963a30f69ecf40ff437c35e3da49 (patch)
treeb3b27e8130ea80684b264e734e34447ec2148054 /abs/core/runit-scripts/runitscripts
parentcb62d17450b7cc365a7bdbe0dac232af4d22faab (diff)
downloadlinhes_pkgbuild-5cacb421450d963a30f69ecf40ff437c35e3da49.zip
linhes_pkgbuild-5cacb421450d963a30f69ecf40ff437c35e3da49.tar.gz
linhes_pkgbuild-5cacb421450d963a30f69ecf40ff437c35e3da49.tar.bz2
runit-scripts: add plexmediaserver
Diffstat (limited to 'abs/core/runit-scripts/runitscripts')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/plexmediaserver/run20
1 files changed, 20 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/plexmediaserver/run b/abs/core/runit-scripts/runitscripts/services/plexmediaserver/run
new file mode 100755
index 0000000..6d0b04e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/plexmediaserver/run
@@ -0,0 +1,20 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/plexmediaserver
+. /etc/locale.conf
+
+stat_runit "Starting Plex Media Server"
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
+export PLEX_MEDIA_SERVER_HOME="${PLEX_MEDIA_SERVER_HOME}"
+export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
+export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="${PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS}"
+export PLEX_MEDIA_SERVER_TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
+export TMPDIR="${TMPDIR}"
+export LC_ALL="${LANG}"
+export LANG="${LANG}"
+ulimit -s 3000
+
+exec chpst -uplex:plex /opt/plexmediaserver/Plex\ Media\ Server