Wackamole folks,
What method do you use to "cleanly" shut down a wackamole server for
minimal downtime? I've found the following works:
ifconfig | grep eth0: # locate virtual interfaces (ie eth0:1)
ps x | grep wackamole # locate wackamole PID
kill -9 WACK-PID ; ifconfig VIRT-INT down
If I have a continuous ping going, I never see the traffic drop using
this method (it just instantly is taken over by the other wackamole server).
Is there a cleaner method to do this that I'm overlooking?
If not, I was futher trying to simplify this by writing a shutdown
script. I'm not that good at scripting in unix just yet, but I know what I
need to accomplish, just not the syntax or formatting to get it into a
script needing no human intervention:
## Kill off wackamole ##
ps x | grep wackamole | awk '(print $1}'
# this will kick out the PID of wackamole
# I need a way to get that PID at the end of this command:
kill -9
## Down the virtual interfaces ##
ifconfig | grep eth0: | awk '{print $1}'
# This will kick out:
eth0:1
eth0:2
...
eth0:n
# From there, I basically need a way to loop through the output and do the
following command:
ifconfig $virtual_interface down
TIA,
Jason Roysdon
http://jason.roysdon.net
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
What method do you use to "cleanly" shut down a wackamole server for
minimal downtime? I've found the following works:
ifconfig | grep eth0: # locate virtual interfaces (ie eth0:1)
ps x | grep wackamole # locate wackamole PID
kill -9 WACK-PID ; ifconfig VIRT-INT down
If I have a continuous ping going, I never see the traffic drop using
this method (it just instantly is taken over by the other wackamole server).
Is there a cleaner method to do this that I'm overlooking?
If not, I was futher trying to simplify this by writing a shutdown
script. I'm not that good at scripting in unix just yet, but I know what I
need to accomplish, just not the syntax or formatting to get it into a
script needing no human intervention:
## Kill off wackamole ##
ps x | grep wackamole | awk '(print $1}'
# this will kick out the PID of wackamole
# I need a way to get that PID at the end of this command:
kill -9
## Down the virtual interfaces ##
ifconfig | grep eth0: | awk '{print $1}'
# This will kick out:
eth0:1
eth0:2
...
eth0:n
# From there, I basically need a way to loop through the output and do the
following command:
ifconfig $virtual_interface down
TIA,
Jason Roysdon
http://jason.roysdon.net
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail