2021-04-19 19:23:10 +02:00
|
|
|
02firstboot = $(CHROOT)/usr/local/bin/02firstboot.start
|
|
|
|
cert-renew.sh = $(CHROOT)/etc/ssl/cert-renew.sh
|
2021-03-16 19:33:40 +01:00
|
|
|
nginx_conf = $(CHROOT)/etc/nginx/nginx.conf.orig
|
|
|
|
example_com_conf = $(CHROOT)/etc/nginx/conf.d/example.com.conf
|
|
|
|
ejabberd_example_com_conf = $(CHROOT)/etc/nginx/conf.d/ejabberd.example.com.conf
|
|
|
|
|
2021-04-19 19:23:10 +02:00
|
|
|
systemd-units: appliance/PostgreSQL-Backup.sh appliance/backup.service appliance/backup.timer appliance/cert-renew.service appliance/cert-renew.timer
|
|
|
|
mkdir -p $(CHROOT)/usr/local/bin
|
|
|
|
cp appliance/PostgreSQL-Backup.sh $(CHROOT)/usr/local/bin/
|
|
|
|
cp appliance/backup.service appliance/backup.timer appliance/cert-renew.service appliance/cert-renew.timer $(CHROOT)/etc/systemd/system/
|
|
|
|
|
2021-03-16 19:33:40 +01:00
|
|
|
$(02firstboot): appliance/02firstboot.start
|
2021-04-19 19:23:10 +02:00
|
|
|
mkdir -p $(CHROOT)/usr/local/bin
|
2021-03-16 19:33:40 +01:00
|
|
|
cp $< $@
|
|
|
|
touch $(CHROOT)/02firstboot
|
|
|
|
|
|
|
|
$(cert-renew.sh): appliance/cert-renew.sh
|
2021-04-19 19:23:10 +02:00
|
|
|
mkdir -p $(CHROOT)/etc/ssl
|
2021-03-16 19:33:40 +01:00
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(nginx_conf): nginx/nginx.conf
|
|
|
|
mv $(CHROOT)/etc/nginx/nginx.conf $@
|
|
|
|
cp $< $(CHROOT)/etc/nginx/nginx.conf
|
|
|
|
|
|
|
|
$(example_com_conf): nginx/conf.d/example.com.conf
|
|
|
|
mkdir -p $(CHROOT)/etc/nginx/conf.d
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(ejabberd_example_com_conf): nginx/conf.d/ejabberd.example.com.conf
|
|
|
|
mkdir -p $(CHROOT)/etc/nginx/conf.d
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
preinstall:
|
|
|
|
# workaround for https://bugs.gentoo.org/716968
|
|
|
|
mkdir -p $(CHROOT)/etc/ssl/ejabberd
|
|
|
|
touch $(CHROOT)/etc/ssl/ejabberd/server.pem
|
|
|
|
|
2021-04-19 19:23:10 +02:00
|
|
|
postinstall: systemd-units $(nginx_conf) $(example_com_conf) $(ejabberd_example_com_conf) $(02firstboot) $(cert-renew.sh)
|
2021-03-16 19:33:40 +01:00
|
|
|
# workaround for https://bugs.gentoo.org/716968
|
|
|
|
rm -rf $(CHROOT)/etc/ssl/ejabberd
|
|
|
|
# configure postgresql
|
|
|
|
sed -i 's#^PG_INITDB_OPTS=.*#PG_INITDB_OPTS="--encoding=UTF8 --locale=de_DE.UTF-8"#' $(CHROOT)/etc/conf.d/postgresql-*
|
|
|
|
rm -rf $(CHROOT)/var/lib/postgresql/*
|
|
|
|
RUN emerge --config dev-db/postgresql
|