for some reason i need to start apache2 only after mysql is running on one of the servers.
i've tried:
- renaming scripts in /etc/rc2.d to give S0Xmysql lower number than S0Yapache2 - but it did not help.
- editing /etc/init.d/apache2 and adding Required-Start $mysql
but still when i watch the screen at the bootup i see
INIT: Entering runlevel: 2
...
Starting web server: apache2Action 'start' failed.
and only then
Starting MySQL database server: mysqld
thx
At the top of /etc/init.d/apache2, you'll see the lsb-header section which looks like this:
You want to copy this text into a new file you'll create named
/etc/insserv/overrides/apache2
. Change theRequired-Start
line by adding "mysql" to the end of the line. then runinsserv -d
. You should then see that the startup link for apache2 is moved to be later than mysql.