compose-website/unit-files/static-importer@.service
2014-11-07 15:58:15 +00:00

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