Fix ordering of starting Apache and PostgreSQL.

If Apache is started before PostgreSQL it complains about problems
with connecting to database.
(cherry picked from commit 34a962c715452996775cabf63cf27bc823b7f5a2)