Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: mod_backhand: Wackamole
execute a command after getting/loosing a IP-Address?
 

Index | Next | Previous | View Flat


oliver.faenger at web

Nov 26, 2003, 3:27 AM


Views: 968
Permalink
execute a command after getting/loosing a IP-Address?

Hi list,

i've set up a round robin/failover scenario with squid.
Wackamole works fine, but my problem is that, in my case,
squid has to bind itself to a special address (not all 0.0.0.0).
So i have to send a kill -HUP to the squid process, after getting a new
IP address, because squid does not listen to this IP.
The problem occurs with any other process, that binds to a special IP and not
to all.

I've put a line in wackamole.c at the end of the Acquire function:
system ("kill -HUP `cat /var/run/squid.pid >/dev/null 2>&1` >/dev/null 2>&1");

But I don't like this very dirty solution, so i wanted to ask,
if there could be a better way to execute a command after
acquiring/releasing an ip address.

I can write the system stuff in c, but I would prefer a more configurable solution.


Thanks.

Kind regards,



Oliver Fänger

Subject User Time
execute a command after getting/loosing a IP-Address? oliver.faenger at web Nov 26, 2003, 3:27 AM
    execute a command after getting/loosing a IP-Address? caudy at jhu Nov 27, 2003, 8:13 AM
    execute a command after getting/loosing a IP-Address? jesus at omniti Nov 27, 2003, 8:38 AM
    execute a command after getting/loosing a IP-Address? oliver.faenger at web Nov 27, 2003, 9:49 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.