packages/net/ndyndns/files/ndyndns.init
jow 10b17a11a0 [packages] ndyndns: use network.sh to find device names
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31947 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-28 15:31:06 +00:00

22 lines
420 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2007-2012 OpenWrt.org
START=80
start() {
. /lib/functions/network.sh
[ -f /etc/ndyndns/ndyndns.conf ] || {
echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2
return 1
}
local device
network_get_device device wan && \
service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $device
}
stop() {
service_stop /usr/sbin/ndyndns
}