summaryrefslogtreecommitdiff
path: root/src/fossil-enable-apache@.service
blob: d90a36f73d29ce7431c6dcc93f043a454bfada37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description = Create and enable apache2 site
ConditionPathExists = /etc/apache2/sites-available/fossil.conf~template
ConditionPathExists = !/etc/apache2/sites-available/fossil-%H.conf

[Service]
Type = oneshot
ExecStart = sh -c '\
sed -e s/%[H]/%H/ \
< /etc/apache2/sites-available/fossil.conf~template \
> /etc/apache2/sites-available/fossil-%H.conf \
'
ExecStart = a2ensite fossil-%H
ExecStart = systemctl reload apache2