summaryrefslogtreecommitdiff
path: root/src/fossil-enable-apache@.service
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-06-01 18:11:20 -0400
committerAndrew Cady <d@jerkface.net>2023-06-01 18:11:20 -0400
commitcc171c3917d410d4ca95bf305a9f247378fdbb2f (patch)
tree8a0c9ec63e40de9072a3a70edfd40e838fda8c3d /src/fossil-enable-apache@.service
parent513765b244d5de1f54edbf4ba6be79c5933cfa3f (diff)
automatic apache configuration of fossil reverse proxy for virtual host of local hostname
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