#!/bin/bash
#chkconfig: 2345 50 50
#description: real server init script
VIP=192.168.80.80
case $1 in
"start")
echo "starting real server ..."
ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up
echo "1">/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2">/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1">/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2">/proc/sys/net/ipv4/conf/all/arp_announce
;;
"stop")
echo "stoping real server ..."
ifconfig lo:0 $VIP down
echo "0">/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "0">/proc/sys/net/ipv4/conf/lo/arp_announce
echo "0">/proc/sys/net/ipv4/conf/all/arp_ignore
echo "0">/proc/sys/net/ipv4/conf/all/arp_announce
;;
"*")
echo "not suport option $1"
;;
esac