florian 252940db34 Convert updatedd to the uci config format, add a hotplug script as well (#1213)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6436 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-02-28 17:58:09 +00:00

27 lines
481 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
. /etc/functions.sh
config_load updatedd
config_get ddns_service cfg1 ddns_service
config_get ddns_user cfg1 ddns_user
config_get ddns_passwd cfg1 ddns_passwd
config_get ddns_host cfg1 ddns_host
config_get ddns_update cfg1 ddns_update
start() {
[ "$ddns_update" = 1 ] && {
/usr/bin/updatedd -Y $ddns_service -- $ddns_user:$ddns_passwd $ddns_host
}
}
stop() {
killall updatedd
}
restart() {
stop
start
}