summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-httpd/apache2
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-11-22 11:07:40 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-11-27 10:39:51 -0500
commit8c4f65366b237ca86ca07a30fe8a68940bc6ec91 (patch)
treee8f8ec987649485a5c21b76e6a5c057549f5e548 /meta-openstack/recipes-httpd/apache2
parentde6773ada3e38be3ce734e9e73288df37de32437 (diff)
downloadmeta-cloud-services-8c4f65366b237ca86ca07a30fe8a68940bc6ec91.tar.gz
apache: changes to support systemd
Auto start apache2 and adapt how we change the logging location from /var/apache2/logs to /var/log/apache2. Sysvinit specific changes are removed as we only plan to support systemd. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-httpd/apache2')
-rw-r--r--meta-openstack/recipes-httpd/apache2/apache2_2.4.%.bbappend5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta-openstack/recipes-httpd/apache2/apache2_2.4.%.bbappend b/meta-openstack/recipes-httpd/apache2/apache2_2.4.%.bbappend
index 7af8143..5fc832d 100644
--- a/meta-openstack/recipes-httpd/apache2/apache2_2.4.%.bbappend
+++ b/meta-openstack/recipes-httpd/apache2/apache2_2.4.%.bbappend
@@ -1,13 +1,14 @@
1do_install_append() { 1do_install_append() {
2 sed -i -e 's/#ServerName.*$/ServerName 127.0.0.1:80/' ${D}${sysconfdir}/apache2/httpd.conf 2 sed -i -e 's/#ServerName.*$/ServerName 127.0.0.1:80/' ${D}${sysconfdir}/apache2/httpd.conf
3 # Keep our logs together, also matches ubuntu and debian
4 sed -i -e 's@^\(.*\)/var/apache2/logs\(.*\)$@\1/var/log/apache2\2@g' ${D}${sysconfdir}/apache2/httpd.conf
3 5
4 # default layout for htdocsdir in 2.4.7 is different, create the following for 6 # default layout for htdocsdir in 2.4.7 is different, create the following for
5 # backward compatibility reasons 7 # backward compatibility reasons
6 8
7 mkdir -p ${D}${datadir}/${BPN}/default-site 9 mkdir -p ${D}${datadir}/${BPN}/default-site
8 ln -sf ../htdocs ${D}${datadir}/${BPN}/default-site/htdocs 10 ln -sf ../htdocs ${D}${datadir}/${BPN}/default-site/htdocs
9
10 sed -i '30i if [ ! -e /var/log/apache2 ]; then ln -sf /var/apache2/logs/ /var/log/apache2; fi' ${D}/etc/init.d/apache2
11} 11}
12 12
13FILES_${PN} += "${datadir}/${BPN}/default-site" 13FILES_${PN} += "${datadir}/${BPN}/default-site"
14SYSTEMD_AUTO_ENABLE_${PN} = "enable"