summaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2020-01-20 10:33:01 +0100
committerDennis Eriksen <d@ennis.no>2020-01-20 10:33:01 +0100
commitb62ddf8032289b92fd8a0295a6afec3c5cbabc1c (patch)
tree29c4f2ea11be25b6b85945e55924170d70b037b8 /mkosi.postinst
downloadmkosi-miniflux-b62ddf8032289b92fd8a0295a6afec3c5cbabc1c.tar.gz
Initial commit
Diffstat (limited to 'mkosi.postinst')
-rwxr-xr-xmkosi.postinst29
1 files changed, 29 insertions, 0 deletions
diff --git a/mkosi.postinst b/mkosi.postinst
new file mode 100755
index 0000000..1c599bb
--- /dev/null
+++ b/mkosi.postinst
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -ex
+export DEBIAN_FRONTEND=noninteractive
+
+# 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 ${RELEASE}-security main universe" >> /etc/apt/sources.list
+echo "deb http://no.archive.ubuntu.com ${RELEASE}-updates main universe" >> /etc/apt/sources.list
+apt update && apt --yes full-upgrade && apt --yes autoremove
+
+# locales
+sed -i 's/# en_IE.UTF-8 UTF-8/en_IE.UTF-8 UTF-8/' /etc/locale.gen
+locale-gen
+
+# install miniflux
+curl -s https://apt.miniflux.app/KEY.gpg | apt-key add -
+echo "deb https://apt.miniflux.app/ /" > /etc/apt/sources.list.d/miniflux.list
+apt update
+
+apt install --yes miniflux
+
+mkdir /etc/miniflux
+chown miniflux:miniflux /etc/miniflux
+chmod 700 /etc/miniflux