#!/bin/bash
# Copyright (C) 2000-2005 SWsoft. All rights reserved.
#
# This file may be distributed under the terms of the Q Public License
# as defined by Trolltech AS of Norway and appearing in the file
# LICENSE.QPL included in the packaging of this file.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# This script does clean up after VPS shutdown
#
# Parameters are passed in environment variables.
# Required parameters:
#   VEID    - VPS id
#   IP_ADDR - VPS IP address(es) divided by spaces

. /usr/lib/vzctl/scripts/vps-functions

# get list of network devices for vzarp
vzgetnetdev

for IP in $IP_ADDR; do
	vzdelrouting $IP
	vzarp del $IP
done
exit 0
# end of script
