packages/net/ndyndns/files/ndyndns.init
nico a9d02a667d packages/ndyndns: use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29064 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-13 22:15:55 +00:00

22 lines
441 B
Bash

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