0

I have a Pi running basic Wheezy, which functions, among other things, as a web server. I have it hooked up to run Tiny-Tiny-RSS (though for the purposes here, it could be any PHP app) over PostgreSQL.

Usually, I run the Pi headless, so I don't see the startup log, but lately I hooked it up to a screen, so I saw something startling - PHP was outputting warnings of not being able to connect to the database because, unsurprisingly, it wasn't up. And indeed, after a bit of research, an ls of /etc/rc2.d/ (and checking that this was indeed the correct runlevel) showed me that postgresql was prefixed with S03 and php5-fpm was prefixed with S01. I then alter the LSB header of php5-fpm to have the line #Required Start: postgresql. No dice, a reboot shows the same startup order and the same warning, which is output BEFORE the postgresql service writes that it's starting. In despair, I manually change the link order so postgresql is prefixed with S01 and php5-fpm is prefixed with S02.

Again, no dice, which leads me to believe I am missing something incredibly basic. What can I do to make sure the php service does not load before the postgresql service?

1 Answer 1

1

In order to update the rc2.d links you need to run update-rc.d

update-rc.d php5-fpm defaults
2
  • This sounded ideal, but the error still occurs.
    – Faqa
    Commented Aug 29, 2014 at 13:18
  • Strange when I test it, it changes the Sxx according to required services. Perhaps you can try update-rc.d -f php5-fpm remove and next update-rc.d php5-fpm default ? Otherwise could you precise what occurs in the rc2.d links ?
    – mpromonet
    Commented Aug 29, 2014 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.