23 lines
615 B
Desktop File
23 lines
615 B
Desktop File
[Unit]
|
|
Description=static importer
|
|
|
|
# Dependency ordering
|
|
Before=static@%i.service
|
|
Before=backup@%i.timer
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
Environment=DOMAIN=%i
|
|
ExecStartPre=/data/indiehosters/scripts/backup-init.sh
|
|
ExecStartPre=/data/indiehosters/scripts/import.sh
|
|
ExecStart=/bin/bash -euxc ' \
|
|
cp /data/domains/%i/TLS/%i.pem /data/runtime/haproxy/approved-certs/%i.pem; \
|
|
static_folder=/data/domains/%i/static/www-content; \
|
|
if [ ! -f $static_folder/index.html ]; then \
|
|
mkdir -p $static_folder; \
|
|
echo Hello %i > $static_folder/index.html; \
|
|
fi;'
|
|
|
|
[Install]
|
|
WantedBy=static@%i.service
|