blob: 35c10b429cbeddcb4563817dfcf11d934295f750 (
plain) (
tree)
|
|
#!/bin/sh
set -ex
export DEBIAN_FRONTEND=noninteractive
export XDG_CONFIG_HOME="/config/xdg"
# motd
chmod 644 /etc/update-motd.d/*
systemctl mask motd-news.service
systemctl mask motd-news.timer
# Add update- and security-repositories, and perform upgrade
RELEASE=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F'=' '{print $2}')
echo "deb http://no.archive.ubuntu.com/ubuntu ${RELEASE}-security main universe" >> /etc/apt/sources.list
echo "deb http://no.archive.ubuntu.com/ubuntu ${RELEASE}-updates main universe" >> /etc/apt/sources.list
apt-get update && apt-get --yes full-upgrade && apt-get --yes autoremove
# ples
systemctl enable systemd-networkd
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-get update
apt-get 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-get update
cp /usr/lib/plexmediaserver/lib/plexmediaserver.service /etc/systemd/system/
systemctl enable plexmediaserver.service
|