diff options
author | Andrew Cady <d@jerkface.net> | 2023-06-01 18:11:20 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-06-01 18:11:20 -0400 |
commit | cc171c3917d410d4ca95bf305a9f247378fdbb2f (patch) | |
tree | 8a0c9ec63e40de9072a3a70edfd40e838fda8c3d /src/fossil-enable-apache@.service | |
parent | 513765b244d5de1f54edbf4ba6be79c5933cfa3f (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@.service | 14 |
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] | ||
2 | Description = Create and enable apache2 site | ||
3 | ConditionPathExists = /etc/apache2/sites-available/fossil.conf~template | ||
4 | ConditionPathExists = !/etc/apache2/sites-available/fossil-%H.conf | ||
5 | |||
6 | [Service] | ||
7 | Type = oneshot | ||
8 | ExecStart = sh -c '\ | ||
9 | sed -e s/%[H]/%H/ \ | ||
10 | < /etc/apache2/sites-available/fossil.conf~template \ | ||
11 | > /etc/apache2/sites-available/fossil-%H.conf \ | ||
12 | ' | ||
13 | ExecStart = a2ensite fossil-%H | ||
14 | ExecStart = systemctl reload apache2 | ||