summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-08-22 18:29:34 -0700
committerIvan Kohler <ivan@freeside.biz>2012-08-22 18:29:34 -0700
commit5691616696e80f44b4ed29605a71a806801e5075 (patch)
treed01b42e0e20debd5019bf9115ea815ba7598fbac
parentb363aa7cba74133e183fe0e3f64808396e3c854b (diff)
fix apache starting before postgres or mysql, RT#18983
-rw-r--r--Makefile2
-rw-r--r--init.d/insserv-override-apache211
2 files changed, 13 insertions, 0 deletions
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