updatedd:
[openwrt/svn-archive/archive.git] / net / updatedd / files / updatedd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3 START=50
4
5 start_service () {
6 local section="$1"
7 config_get service "$section" service
8 config_get user "$section" user
9 config_get passwd "$section" passwd
10 config_get host "$section" host
11 config_get update "$section" update
12
13 [ "$update" = 1 ] && {
14 /usr/bin/updatedd -Y $service -- $user:$passwd $host
15 }
16 }
17
18 start() {
19 config_load "updatedd"
20 config_foreach start_service updatedd
21 }
22
23 stop() {
24 killall updatedd
25 }