From d885a6d6384285083da6a56ba19e8e9b89d2ba2b Mon Sep 17 00:00:00 2001 From: mhoellein Date: Thu, 8 Aug 2019 00:07:38 +0200 Subject: [PATCH] daily autocommit --- .etckeeper | 3 +++ apt/sources.list.d/plexmediaserver.list | 3 +++ default/plexmediaserver | 23 +++++++++++++++++++ group | 3 ++- group- | 2 ++ gshadow | 3 ++- gshadow- | 2 ++ init/plexmediaserver.conf | 22 ++++++++++++++++++ passwd | 1 + passwd- | 3 ++- shadow | 1 + shadow- | 1 + .../plexmediaserver.service | 1 + 13 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 apt/sources.list.d/plexmediaserver.list create mode 100644 default/plexmediaserver create mode 100644 init/plexmediaserver.conf create mode 120000 systemd/system/multi-user.target.wants/plexmediaserver.service diff --git a/.etckeeper b/.etckeeper index ee32422d..01468366 100755 --- a/.etckeeper +++ b/.etckeeper @@ -765,6 +765,7 @@ maybe chmod 0664 'apt/sources.list' maybe chmod 0755 'apt/sources.list.d' maybe chmod 0644 'apt/sources.list.d/MariaDB.list' maybe chmod 0644 'apt/sources.list.d/official-package-repositories.list' +maybe chmod 0644 'apt/sources.list.d/plexmediaserver.list' maybe chmod 0600 'apt/trustdb.gpg' maybe chmod 0644 'apt/trusted.gpg' maybe chmod 0755 'apt/trusted.gpg.d' @@ -2175,6 +2176,7 @@ maybe chmod 0644 'default/ntp' maybe chmod 0644 'default/ntpdate' maybe chmod 0644 'default/openbsd-inetd' maybe chmod 0644 'default/openvpn' +maybe chmod 0644 'default/plexmediaserver' maybe chmod 0644 'default/proftpd' maybe chmod 0644 'default/rcS' maybe chmod 0644 'default/redis-server' @@ -2930,6 +2932,7 @@ maybe chmod 0644 'init/network-manager.conf' maybe chmod 0644 'init/network-manager.override' maybe chmod 0644 'init/oem-config.conf' maybe chmod 0644 'init/php7.2-fpm.conf' +maybe chmod 0644 'init/plexmediaserver.conf' maybe chmod 0644 'init/plymouth-log.conf' maybe chmod 0644 'init/plymouth-ready.conf' maybe chmod 0644 'init/plymouth-shutdown.conf' diff --git a/apt/sources.list.d/plexmediaserver.list b/apt/sources.list.d/plexmediaserver.list new file mode 100644 index 00000000..fbf9252b --- /dev/null +++ b/apt/sources.list.d/plexmediaserver.list @@ -0,0 +1,3 @@ +# When enabling this repo please remember to add the PlexPublic.Key into the apt setup. +# wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - +#deb https://downloads.plex.tv/repo/deb/ public main diff --git a/default/plexmediaserver b/default/plexmediaserver new file mode 100644 index 00000000..51709fc8 --- /dev/null +++ b/default/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 diff --git a/group b/group index fee5352c..a011a90e 100644 --- a/group +++ b/group @@ -30,7 +30,7 @@ src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: -video:x:44: +video:x:44:plex sasl:x:45: plugdev:x:46:mhoellein staff:x:50: @@ -104,3 +104,4 @@ lool:x:156: serverbackup:x:5003: autossh:x:5004: systemd-coredump:x:157: +plex:x:158: diff --git a/group- b/group- index 25c0a8df..22386b08 100644 --- a/group- +++ b/group- @@ -103,3 +103,5 @@ geoclue:x:155: lool:x:156: serverbackup:x:5003: autossh:x:5004: +systemd-coredump:x:157: +plex:x:158: diff --git a/gshadow b/gshadow index f8d0eabe..f980d2c1 100644 --- a/gshadow +++ b/gshadow @@ -30,7 +30,7 @@ src:*:: gnats:*:: shadow:*:: utmp:*:: -video:*:: +video:*::plex sasl:*:: plugdev:*::mhoellein staff:*:: @@ -104,3 +104,4 @@ lool:!:: serverbackup:!:: autossh:!:: systemd-coredump:!:: +plex:!:: diff --git a/gshadow- b/gshadow- index e7a1a38a..e5b4dfa5 100644 --- a/gshadow- +++ b/gshadow- @@ -103,3 +103,5 @@ geoclue:!:: lool:!:: serverbackup:!:: autossh:!:: +systemd-coredump:!:: +plex:!:: diff --git a/init/plexmediaserver.conf b/init/plexmediaserver.conf new file mode 100644 index 00000000..cc1bca5a --- /dev/null +++ b/init/plexmediaserver.conf @@ -0,0 +1,22 @@ +# Plex Media Server - service job file + +description "Plex Media Server" +author "https://plex.tv/" + +# Start the media server after network and filesystem +# Otherwise this lead to a unresponsive server +start on filesystem and net-device-up IFACE!=lo + +# When to stop the service +stop on runlevel [016] + +# Automatically restart process if crashed +respawn + +# What to execute +script + if [ -r /etc/default/plexmediaserver ]; then + . /etc/default/plexmediaserver + fi + start-stop-daemon --start -c $PLEX_MEDIA_SERVER_USER --exec /usr/sbin/start_pms +end script diff --git a/passwd b/passwd index 4704155d..40e5db37 100644 --- a/passwd +++ b/passwd @@ -77,3 +77,4 @@ lool:x:149:156::/opt/lool:/usr/sbin/nologin serverbackup:x:5003:5003::/home/serverbackup:/bin/bash autossh:x:5004:5004:ssh tunnel user:/var/lib/autossh:/bin/sh systemd-coredump:x:150:157:systemd core dump processing,,,:/run/systemd:/usr/sbin/nologin +plex:x:151:158::/var/lib/plexmediaserver:/bin/bash diff --git a/passwd- b/passwd- index 1f98fab3..40e5db37 100644 --- a/passwd- +++ b/passwd- @@ -76,4 +76,5 @@ geoclue:x:148:155::/var/lib/geoclue:/usr/sbin/nologin lool:x:149:156::/opt/lool:/usr/sbin/nologin serverbackup:x:5003:5003::/home/serverbackup:/bin/bash autossh:x:5004:5004:ssh tunnel user:/var/lib/autossh:/bin/sh -systemd-coredump:x:150:157::/run/systemd:/usr/sbin/nologin +systemd-coredump:x:150:157:systemd core dump processing,,,:/run/systemd:/usr/sbin/nologin +plex:x:151:158::/var/lib/plexmediaserver:/bin/bash diff --git a/shadow b/shadow index a31fd3ec..ec4923fd 100644 --- a/shadow +++ b/shadow @@ -77,3 +77,4 @@ lool:*:17828:0:99999:7::: serverbackup:$6$eaExedUs$qMxK2M5Q/pA6bz8crjGw1pESBnAFkus3IHDZTkCe1FFOw6LECghvQfM86zyNk.G4L5chDSgYeElHSvWgPIxJ.1:17841:0:99999:7::: autossh:!:17872:0:99999:7::: systemd-coredump:*:18049:0:99999:7::: +plex:*:18115:0:99999:7::: diff --git a/shadow- b/shadow- index a31fd3ec..ec4923fd 100644 --- a/shadow- +++ b/shadow- @@ -77,3 +77,4 @@ lool:*:17828:0:99999:7::: serverbackup:$6$eaExedUs$qMxK2M5Q/pA6bz8crjGw1pESBnAFkus3IHDZTkCe1FFOw6LECghvQfM86zyNk.G4L5chDSgYeElHSvWgPIxJ.1:17841:0:99999:7::: autossh:!:17872:0:99999:7::: systemd-coredump:*:18049:0:99999:7::: +plex:*:18115:0:99999:7::: diff --git a/systemd/system/multi-user.target.wants/plexmediaserver.service b/systemd/system/multi-user.target.wants/plexmediaserver.service new file mode 120000 index 00000000..7dd44393 --- /dev/null +++ b/systemd/system/multi-user.target.wants/plexmediaserver.service @@ -0,0 +1 @@ +/lib/systemd/system/plexmediaserver.service \ No newline at end of file -- 2.43.0