#!/bin/bash

set -eu
IPMAN_LIB_PATH="$(dirname ${BASH_SOURCE[0]})/../lib/lwr/ipman"
source "${IPMAN_LIB_PATH}/ip-functions.sh"
source "${IPMAN_LIB_PATH}/events.sh"

INTERFACE_NAME=${1}

ipman_delete_labeled_address "${INTERFACE_NAME}" static
ipman_delete_labeled_route "${INTERFACE_NAME}" "static" || true
ipman_emit_status_changed "${INTERFACE_NAME}" "static" "disabled"
