summaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
blob: a8d222d802a30cbbc01c918ecf61e6576473a954 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -ex

systemctl enable systemd-networkd

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