summaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
blob: 718bb0fd1be6d636b60052fee69f3ee6a50259ba (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
#!/bin/sh
set -ex
export DEBIAN_FRONTEND=noninteractive
export HOME="/config"

# 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 update && apt --yes full-upgrade && apt --yes autoremove

# sabnzbd
groupadd --system --gid 997 warez
useradd --system --gid warez --uid 997 warez


add-apt-repository --yes ppa:jcfp/nobetas
add-apt-repository --yes ppa:jcfp/sab-addons
apt install --yes sabnzbdplus python-sabyenc par2-tbb python-pip

pip install --no-cache-dir apprise chardet pynzb requests sabyenc

apt purge --auto-remove --yes python-pip
apt clean