summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2016-11-13 12:13:35 +0100
committerStefan Fritsch <sf@sfritsch.de>2016-11-13 12:17:55 +0100
commit9a7ed57a978d89dcd8f89cdde865c9e4967b3c30 (patch)
treeb41666cbf16356840ea57287c23a708ebe15f05f
parent5193a1ce883b0fc0676767a2fc91d64dac98c46a (diff)
downloadapache2-9a7ed57a978d89dcd8f89cdde865c9e4967b3c30.tar.gz
Fix systemd unit naming for multi-instances.
%I will unescape '-' to '/'. This means an instance name like proxy-balancer would try to use /etc/apache2-proxy/balancer which is not what we want. Use %i to avoid unescaping.
-rw-r--r--debian/apache2.apache-htcacheclean@.service4
-rw-r--r--debian/apache2@.service4
-rw-r--r--debian/changelog1
3 files changed, 5 insertions, 4 deletions
diff --git a/debian/apache2.apache-htcacheclean@.service b/debian/apache2.apache-htcacheclean@.service
index 1ec2f62d..5cd86726 100644
--- a/debian/apache2.apache-htcacheclean@.service
+++ b/debian/apache2.apache-htcacheclean@.service
@@ -7,9 +7,9 @@ Type=forking
User=www-data
Environment=HTCACHECLEAN_SIZE=300M
Environment=HTCACHECLEAN_DAEMON_INTERVAL=120
-Environment=HTCACHECLEAN_PATH=/var/cache/apache2-%I/mod_cache_disk
+Environment=HTCACHECLEAN_PATH=/var/cache/apache2-%i/mod_cache_disk
Environment=HTCACHECLEAN_OPTIONS=-n
-EnvironmentFile=-/etc/default/apache-htcacheclean-%I
+EnvironmentFile=-/etc/default/apache-htcacheclean-%i
ExecStart=/usr/bin/htcacheclean -d $HTCACHECLEAN_DAEMON_INTERVAL -p $HTCACHECLEAN_PATH -l $HTCACHECLEAN_SIZE $HTCACHECLEAN_OPTIONS
[Install]
diff --git a/debian/apache2@.service b/debian/apache2@.service
index c0720505..395137ba 100644
--- a/debian/apache2@.service
+++ b/debian/apache2@.service
@@ -1,11 +1,11 @@
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
-ConditionPathIsDirectory=/etc/apache2-%I
+ConditionPathIsDirectory=/etc/apache2-%i
[Service]
Type=forking
-Environment=APACHE_CONFDIR=/etc/apache2-%I
+Environment=APACHE_CONFDIR=/etc/apache2-%i
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
diff --git a/debian/changelog b/debian/changelog
index b57e4349..5cafd5ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ apache2 (2.4.23-7) UNRELEASED; urgency=medium
* Move DefaultRuntimeDir and pid file for multi-instances to
/var/run/apache2-xxx. Thanks to Horst Platz for the debugging.
Closes: #838932 LP: #1627339
+ * Fix systemd unit naming for multi-instances.
* Tweak embedded .tar.gz some more to build reproducibly.
-- Stefan Fritsch <sf@debian.org> Sun, 13 Nov 2016 11:06:36 +0100