2008-03-18 19:07:42 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-05-28 15:31:06 +00:00
|
|
|
# Copyright (C) 2007-2012 OpenWrt.org
|
2008-03-18 19:07:42 +00:00
|
|
|
|
|
|
|
START=80
|
|
|
|
|
2011-11-13 22:15:55 +00:00
|
|
|
start() {
|
2012-05-28 15:31:06 +00:00
|
|
|
. /lib/functions/network.sh
|
|
|
|
|
2011-11-13 22:15:55 +00:00
|
|
|
[ -f /etc/ndyndns/ndyndns.conf ] || {
|
|
|
|
echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2
|
|
|
|
return 1
|
|
|
|
}
|
2012-05-28 15:31:06 +00:00
|
|
|
|
|
|
|
local device
|
|
|
|
network_get_device device wan && \
|
|
|
|
service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $device
|
2008-03-18 19:07:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-13 22:15:55 +00:00
|
|
|
service_stop /usr/sbin/ndyndns
|
2008-03-18 19:07:42 +00:00
|
|
|
}
|