summaryrefslogtreecommitdiff
path: root/src/fossil-enable-apache@.service
diff options
context:
space:
mode:
Diffstat (limited to 'src/fossil-enable-apache@.service')
-rw-r--r--src/fossil-enable-apache@.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fossil-enable-apache@.service b/src/fossil-enable-apache@.service
new file mode 100644
index 0000000..d90a36f
--- /dev/null
+++ b/src/fossil-enable-apache@.service
@@ -0,0 +1,14 @@
1[Unit]
2Description = Create and enable apache2 site
3ConditionPathExists = /etc/apache2/sites-available/fossil.conf~template
4ConditionPathExists = !/etc/apache2/sites-available/fossil-%H.conf
5
6[Service]
7Type = oneshot
8ExecStart = sh -c '\
9sed -e s/%[H]/%H/ \
10< /etc/apache2/sites-available/fossil.conf~template \
11> /etc/apache2/sites-available/fossil-%H.conf \
12'
13ExecStart = a2ensite fossil-%H
14ExecStart = systemctl reload apache2