#!/bin/sh

[ "$ACTION" = ifup ] || exit 0

compare_owsd_iface() {
	local interface

	config_get interface $1 interface

	if [ "$INTERFACE" == "$interface" ]; then
		/etc/init.d/owsd reload
		exit
	fi
}

config_load owsd
config_foreach compare_owsd_iface "owsd-listen" "$INTERFACE"
