首页 > 代码库 > real server 的一个启动脚本例子

real server 的一个启动脚本例子

real server 的vip 启动脚本

#!/bin/bash#chkconfig: 2345 50 50#description: real server init scriptVIP=192.168.80.80case $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

 

real server 的一个启动脚本例子