3

I have installed on my CentOS server postgresql service and another one called netnfork. The 'netnfork' service starts only after postgresql starts.

netnfork init script:

#!/bin/sh
#
# netnfork init
#
# chkconfig: 2345 99 15
# description: netnfork
...

From netnfork's init script you can see that start order is 99.

The postgresql init script:

#!/bin/sh
#
# postgresql    This is the init script for starting up the PostgreSQL
#               server.
#
# chkconfig: - 64 36
# description: PostgreSQL database server.
...

As you can see from the postgresql's init script, the start order is 64. The problem is that there are some times when the netnfork service fails to start due to the fact that postgresql service isn't completely started. I know that from log files.

Do you have any workaround for that issue?


N.B. I also put on netnfork's init script the following line:

# Required-Start: network postgresql-9.1,

but without any results.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
artaxerxe
  • 521
  • 2
  • 10
  • 22
  • In a pinch, I'd just manage both daemons with [Monit](http://mmonit.com/monit/). But that's not a clean fix. – ewwhite Nov 02 '12 at 07:48

1 Answers1

2

It looks like your startup service is named postgresql not postgresql-9.1

Try this out in netnfork:

# Required-Start: network postgresql
kernelpanic
  • 1,246
  • 1
  • 10
  • 30