diff options
author | Dennis Eriksen <d@ennis.no> | 2020-01-19 20:39:49 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2020-01-19 20:39:49 +0100 |
commit | 9907b46a6be804d4916af03d59826b8bbaf8c09f (patch) | |
tree | f22bb506da0c8464384551c52879523f22410f98 /mkosi.postinst | |
download | mkosi-ffsync-9907b46a6be804d4916af03d59826b8bbaf8c09f.tar.gz |
Initial commit
Diffstat (limited to 'mkosi.postinst')
-rwxr-xr-x | mkosi.postinst | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mkosi.postinst b/mkosi.postinst new file mode 100755 index 0000000..e04f0be --- /dev/null +++ b/mkosi.postinst @@ -0,0 +1,34 @@ +#!/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=$(grep DISTRIB_CODENAME /etc/lsb-release | 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 + +groupadd --system app +useradd --system --home-dir /app --gid app --shell /usr/sbin/nologin app + +git clone https://github.com/mozilla-services/syncserver /app +mkdir /data +chown -R app:app /app /data +cd /app + +sudo -u app -H make build + +./local/bin/pip install psycopg2 + +systemctl enable ffsync.service + + |