branch Attitude Adjustment packages
[12.09/packages.git] / net / ndyndns / files / ndyndns.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007-2012 OpenWrt.org
3
4 START=80
5
6 start() {
7         . /lib/functions/network.sh
8
9         [ -f /etc/ndyndns/ndyndns.conf ] || {
10                 echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2
11                 return 1
12         }
13
14         local device
15         network_get_device device wan && \
16                 service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $device
17 }
18
19 stop() {
20         service_stop /usr/sbin/ndyndns
21 }