#!/bin/bash
# Example CPE NAT IP hook.
#
# CPE NAT IP hooks are run with the "start" argument after a CPE NAT IP is
# added and with the "stop" argument before it is removed.
#
# Environment variables:
#   ID: the CPE NAT IP ID
#   BOND_ID: the ID of the CPE NAT IP's bond
#   IP: the IP address
#   DEST_NAT_IP: The NAT IP address
#   DEST_NAT_NETMASK: The NAT IP netmask

start () {
    remove 2> /dev/null
    true
}
stop () {
    remove
}
remove () {
    true
}

# Avoid changing anything below here.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
