diff options
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 | ||