Heartbeat nginx startup script?

Hey guys

As I read lots of you are using heartbeat with nginx for failover
I’m currently setting up a similar environment.
Does anyone, by chance, already have a startup/stop/monitoring script
for nginx for being called from heartbeat?
As far as I read it has some other needs than the regular rc scripts.



I am speaking out of turn here, but unless nginx checks for specific
IPs to bind to at the beginning, I don’t think you need to do anything
with nginx.

As long as nginx is running, once the new IPs are inherited via
heartbeat, it should just work.

That being said, if it does need to be restarted, do a simple script
that does:

/etc/init.d/nginx restart

and add that to your heartbeat config (just like the other simple
/etc/ha.d/resource.d/foo scripts)