mir3c/squashfs-root/etc/hotplug.d/iface/25-ddns
2018-05-25 14:19:31 +05:30

15 lines
333 B
Bash

#!/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