Newer
Older
After=mysql-importer@%i.service
Before=wordpress@%i.service
# Dependency binding
BindsTo=wordpress@%i.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/data/indiehosters/scripts/backup-init.sh
ExecStart=/bin/bash -euxc ' \
domain_folder=/data/domains/%i; \
cp $domain_folder/TLS/%i.pem /data/runtime/haproxy/approved-certs/%i.pem; \
if [ ! -d $domain_folder/wordpress/wp-content ]; then \
mkdir -p $domain_folder/wordpress/; \
cd $domain_folder/wordpress/; \
tar xvzf /data/indiehosters/blueprints/wordpress.tgz; \
fi; \
cat $domain_folder/mysql/.env | sed s/MYSQL_PASS/DB_PASS/ > $domain_folder/wordpress/.env'
[Install]
WantedBy=wordpress@%i.service