#!/bin/sh
# VipSetup v1.0  (c) 15.5.2006 by Andreas Ley  (u) 23.5.2006
# Set up virtual IPs for ldirectord

usage()
{
	echo "Usage: $0 <configuration> [<interface>] {start|stop}" >&2
	exit 1
}

test $# -ne 2 -a $# -ne 3 && usage

conf="/etc/ha.d/conf/$1"
shift

if test $# -gt 1; then
	opts="-i $1"
	shift
fi

case "$1" in
	start|restart|reload)	/etc/ha.d/ldirectord_vip_setup ${conf} ${opts}
		;;
	stop)	/etc/ha.d/ldirectord_vip_setup ${conf} -u
		;;
	status)	echo "stopped"
		;;
	*)	usage
		;;
esac
