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'
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'
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'
--- /dev/null
+# 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
--- /dev/null
+# 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
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:
serverbackup:x:5003:
autossh:x:5004:
systemd-coredump:x:157:
+plex:x:158:
lool:x:156:
serverbackup:x:5003:
autossh:x:5004:
+systemd-coredump:x:157:
+plex:x:158:
gnats:*::
shadow:*::
utmp:*::
-video:*::
+video:*::plex
sasl:*::
plugdev:*::mhoellein
staff:*::
serverbackup:!::
autossh:!::
systemd-coredump:!::
+plex:!::
lool:!::
serverbackup:!::
autossh:!::
+systemd-coredump:!::
+plex:!::
--- /dev/null
+# 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
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
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
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:::
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:::
--- /dev/null
+/lib/systemd/system/plexmediaserver.service
\ No newline at end of file