- #!/bin/sh
- #set -e
- if [ -z ${vip} ]; then echo "IP isn't defined!!!"; exit 1; fi
- if [ -z ${vin} ]; then echo "NetMASK isn't defined!!!"; exit 1; fi
- if [ -z ${vif} ]; then echo "IF isn't defined!!!"; exit 1; fi
- trap cleanup SIGTERM EXIT
- cleanup()
- {
- ip addr del ${vip}/${vin} dev ${vif}:vip
- }
- ip addr add ${vip}/${vin} brd + dev ${vif} label ${vif}:vip
- exec "/tmp/check_ip.sh" "$@" &
- wait
|