mir3c/squashfs-root/etc/hotplug.d/iface/25-ddns

15 lines
333 B
Plaintext
Raw Normal View History

2018-05-25 08:49:31 +00:00
#!/bin/sh
. /usr/lib/ddns/dynamic_dns_functions.sh
if [ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" -a "$(uci get ddns.ddns.status 2>/dev/null)" = "on" ]; then
logger -t "hotplug.d" "reloading ddns"
/usr/sbin/ddnsd reload
if [ $? -eq 0 ]
then
logger -t "hotplug.d" "ddns ok"
else
logger -t "hotplug.d" "ddns failed"
fi
fi