[packages_10.03.2] ndyndns: merge r29064
[10.03/packages.git] / net / ndyndns / files / ndyndns.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007-2011 OpenWrt.org
3
4 START=80
5
6 include /lib/network
7
8 start() {
9         scan_interfaces
10         config_get wan_if 'wan' 'ifname'
11         [ -n "$wan_if" ] || return 1
12         [ -f /etc/ndyndns/ndyndns.conf ] || {
13                 echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2
14                 return 1
15         }
16         service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $wan_if
17 }
18
19 stop() {
20         service_stop /usr/sbin/ndyndns
21 }