From 5691616696e80f44b4ed29605a71a806801e5075 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 22 Aug 2012 18:29:34 -0700 Subject: [PATCH] fix apache starting before postgres or mysql, RT#18983 --- Makefile | 2 ++ init.d/insserv-override-apache2 | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 init.d/insserv-override-apache2 diff --git a/Makefile b/Makefile index 4c0f71263..208398af8 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,7 @@ HTTPD_RESTART = /etc/init.d/apache2 restart #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf) #deb (3.1+), apache2 APACHE_CONF = /etc/apache2/conf.d +INSSERV_OVERRIDE = /etc/insserv/overrides FREESIDE_RESTART = ${INIT_FILE} restart @@ -272,6 +273,7 @@ install-apache: s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \ " ${APACHE_CONF}/freeside-*.conf \ ) || true + [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true install-selfservice: [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside diff --git a/init.d/insserv-override-apache2 b/init.d/insserv-override-apache2 new file mode 100644 index 000000000..1b333e806 --- /dev/null +++ b/init.d/insserv-override-apache2 @@ -0,0 +1,11 @@ +### BEGIN INIT INFO +# Provides: apache2 +# Required-Start: $local_fs $remote_fs $network $syslog $named +# Required-Stop: $local_fs $remote_fs $network $syslog $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# X-Interactive: true +# Short-Description: Start/stop apache2 web server +# Should-Start: postgresql mysql +# Should-Stop: postgresql mysql +### END INIT INFO -- 2.11.0