compose-website/unit-files/static-git-importer@.service
2014-11-04 19:16:15 +00:00

19 lines
449 B
Desktop File

[Unit]
Description=static importer
# Dependency ordering
Before=static-git@%i.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -euxc ' \
runtime_folder=/data/runtime/domains/%i/static-git; \
mkdir -p $runtime_folder; \
git_folder=$runtime_folder/www-content; \
if [ ! -d $git_folder/.git ]; then \
git clone `cat /data/domains/%i/static-git/GITURL` $git_folder; \
fi;'
[Install]
WantedBy=static-git@%i.service