summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2016-09-20 15:39:15 +0200
committerRaphaël Hertzog <hertzog@debian.org>2016-09-20 17:37:29 +0200
commit0a58b89af7fafc04285a9b3bee43cd3c02864aba (patch)
tree3a7b65e9773b667bd313af6132b89bbe7d2d9090
parent1bef5ddabce451f9e738c7313eaa756770456252 (diff)
downloadapache2-0a58b89af7fafc04285a9b3bee43cd3c02864aba.tar.gz
Add systemd unit files. Closes: #798430
Partly based on former work of Timo Aaltonen <tjaalton@debian.org>.
-rw-r--r--debian/apache2.apache-htcacheclean.service16
-rw-r--r--debian/apache2.apache-htcacheclean@.service16
-rw-r--r--debian/apache2.service14
-rw-r--r--debian/apache2@.service16
-rw-r--r--debian/changelog4
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules8
7 files changed, 75 insertions, 2 deletions
diff --git a/debian/apache2.apache-htcacheclean.service b/debian/apache2.apache-htcacheclean.service
new file mode 100644
index 00000000..70222f36
--- /dev/null
+++ b/debian/apache2.apache-htcacheclean.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Disk Cache Cleaning Daemon for Apache HTTP Server
+After=apache2.service
+
+[Service]
+Type=forking
+User=www-data
+Environment=HTCACHECLEAN_SIZE=300M
+Environment=HTCACHECLEAN_DAEMON_INTERVAL=120
+Environment=HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk
+Environment=HTCACHECLEAN_OPTIONS=-n
+EnvironmentFile=-/etc/default/apache-htcacheclean
+ExecStart=/usr/bin/htcacheclean -d $HTCACHECLEAN_DAEMON_INTERVAL -p $HTCACHECLEAN_PATH -l $HTCACHECLEAN_SIZE $HTCACHECLEAN_OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/apache2.apache-htcacheclean@.service b/debian/apache2.apache-htcacheclean@.service
new file mode 100644
index 00000000..1ec2f62d
--- /dev/null
+++ b/debian/apache2.apache-htcacheclean@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Disk Cache Cleaning Daemon for Apache HTTP Server
+After=apache2@%i.service
+
+[Service]
+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_OPTIONS=-n
+EnvironmentFile=-/etc/default/apache-htcacheclean-%I
+ExecStart=/usr/bin/htcacheclean -d $HTCACHECLEAN_DAEMON_INTERVAL -p $HTCACHECLEAN_PATH -l $HTCACHECLEAN_SIZE $HTCACHECLEAN_OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/apache2.service b/debian/apache2.service
new file mode 100644
index 00000000..92a371a8
--- /dev/null
+++ b/debian/apache2.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Apache HTTP Server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/apachectl start
+ExecStop=/usr/sbin/apachectl stop
+ExecReload=/usr/sbin/apachectl graceful
+PrivateTmp=true
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/apache2@.service b/debian/apache2@.service
new file mode 100644
index 00000000..c0720505
--- /dev/null
+++ b/debian/apache2@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=The Apache HTTP Server
+After=network.target remote-fs.target nss-lookup.target
+ConditionPathIsDirectory=/etc/apache2-%I
+
+[Service]
+Type=forking
+Environment=APACHE_CONFDIR=/etc/apache2-%I
+ExecStart=/usr/sbin/apachectl start
+ExecStop=/usr/sbin/apachectl stop
+ExecReload=/usr/sbin/apachectl graceful
+PrivateTmp=true
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/changelog b/debian/changelog
index 861d2851..4eef0f34 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
apache2 (2.4.23-5) UNRELEASED; urgency=medium
+ [ Stefan Fritsch ]
* Tweak creation of .tar.gz embedded in preinst to get reproducible
build.
+ [ Raphaël Hertzog ]
+ * Add systemd unit files. Closes: #798430
+
-- Stefan Fritsch <sf@debian.org> Sat, 13 Aug 2016 13:38:30 +0200
apache2 (2.4.23-4) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 151d4628..9bc98a1f 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Stefan Fritsch <sf@debian.org>, Arno Töll <arno@debian.org>
Build-Depends: debhelper (>= 9.20131213~), lsb-release, dpkg-dev (>= 1.16.1~),
libaprutil1-dev (>= 1.5.0), libapr1-dev (>= 1.5.0), libpcre3-dev, zlib1g-dev,
libnghttp2-dev, libssl-dev (>= 0.9.8m), perl,
- liblua5.2-dev, libxml2-dev, autotools-dev, gawk | awk
+ liblua5.2-dev, libxml2-dev, autotools-dev, gawk | awk,
+ dh-systemd
Build-Conflicts: autoconf2.13
Standards-Version: 3.9.8
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-apache/apache2.git/
diff --git a/debian/rules b/debian/rules
index 0202f75d..00dff14b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -96,7 +96,7 @@ generate-maintainer-scripts: debian/apache2.preinst
done
clean build build-arch build-indep binary binary-arch binary-indep: %:
- dh $@ --parallel --with autotools_dev
+ dh $@ --parallel --with autotools_dev,systemd
override_dh_auto_configure: generate-maintainer-scripts prebuild-checks support/suexec-custom.c
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
@@ -150,6 +150,12 @@ override_dh_installinit:
dh_installinit --error-handler=true
dh_installinit --name apache-htcacheclean --noscripts
+override_dh_systemd_enable:
+ dh_systemd_enable -papache2 apache2.service
+ dh_systemd_enable -papache2 --name=apache2@ apache2@.service
+ dh_systemd_enable -papache2 --no-enable --name=apache-htcacheclean apache-htcacheclean.service
+ dh_systemd_enable -papache2 --no-enable --name=apache-htcacheclean@ apache-htcacheclean@.service
+
override_dh_installdocs-indep:
# TODO: So, did anyone check convert_docs needs an update? ;)
perl debian/convert_docs debian/apache2-doc/usr/share/doc/apache2-doc/manual