summaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
diff options
context:
space:
mode:
authordennis <dennis@mrslave>2019-10-20 13:43:07 +0200
committerdennis <dennis@mrslave>2019-10-20 13:43:07 +0200
commite34226f21b01a49a0690b4ff8a4e39b4de680a32 (patch)
treef1edb9523e69b0292d1b5fc2d212d3495b0246a5 /mkosi.postinst
downloadmkosi-plex-e34226f21b01a49a0690b4ff8a4e39b4de680a32.tar.gz
initial commit
Diffstat (limited to 'mkosi.postinst')
-rwxr-xr-xmkosi.postinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/mkosi.postinst b/mkosi.postinst
new file mode 100755
index 0000000..303a4eb
--- /dev/null
+++ b/mkosi.postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -ex
+
+export DEBIAN_FRONTEND=noninteractive
+export XDG_CONFIG_HOME="/config/xdg"
+
+groupadd --system --gid 997 plex
+useradd --system --gid 997 --uid 997 plex
+
+echo deb https://downloads.plex.tv/repo/deb public main > /etc/apt/sources.list.d/plex.list
+
+curl https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add -
+
+apt update
+
+apt install --yes plexmediaserver
+
+# plex adds its own repo-file, with everything commented out. I guess plex
+# wants to do in-app upgrades.
+rm /etc/apt/sources.list.d/plex.list
+
+apt update