packages/net/updatedd/files/updatedd.init
olli e41e87b51f updatedd:
* Update the init script and config file to use multiple updates
 * Cleanup the Makefile

git-svn-id: svn://svn.openwrt.org/openwrt/packages@8072 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-07-20 12:15:36 +00:00

31 lines
513 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
start_service () {
local section="$1"
config_get service "$section" service
config_get user "$section" user
config_get passwd "$section" passwd
config_get host "$section" host
config_get update "$section" update
[ "$update" = 1 ] && {
/usr/bin/updatedd -Y $service -- $user:$passwd $host
}
}
start() {
config_load "updatedd"
config_foreach start_service updatedd
}
stop() {
killall updatedd
}
restart() {
stop
start
}