summaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
blob: 4c7710954ccab51ffbd711339bbf1df68a3648b9 (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
25
26
27
28
29
30
31
32
#!/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

# mono
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" > /etc/apt/sources.list.d/mono-official-stable.list

# sonarr
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
echo "deb http://apt.sonarr.tv/ master main" > /etc/apt/sources.list.d/sonarr.list

apt-get update

apt-get install --yes nzbdrone

groupadd --system --gid 997 warez
useradd --system --gid warez --uid 997 --home-dir /opt/NzbDrone warez

chown -R warez: /opt/NzbDrone