# Heartbeat nginx startup script?

**URL:** <https://www.ruby-forum.com/t/heartbeat-nginx-startup-script/140709>\
**Category:** NGINX\
**Created:** [June 17, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/heartbeat-nginx-startup-script/140709 "2008-06-17T20:24:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 17, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/heartbeat-nginx-startup-script/140709/1 "2008-06-17T20:24:07Z")

</div>

Hey guys

As I read lots of you are using heartbeat with nginx for failover  
purposes.  
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.

Thanks,

thomas

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 17, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/heartbeat-nginx-startup-script/140709/2 "2008-06-17T21:11:04Z")

</div>

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)
