packages/updatedd: use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29069 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ca8a48fdf0
commit
e66bfed974
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2007-2010 OpenWrt.org
|
# Copyright (C) 2007-2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=updatedd
|
PKG_NAME:=updatedd
|
||||||
PKG_VERSION:=2.6
|
PKG_VERSION:=2.6
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
|
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
|
||||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
|
||||||
START=50
|
START=50
|
||||||
|
|
||||||
start_service () {
|
start_instance () {
|
||||||
local section="$1"
|
local section="$1"
|
||||||
config_get service "$section" service
|
config_get service "$section" 'service'
|
||||||
config_get username "$section" username
|
config_get username "$section" 'username'
|
||||||
config_get password "$section" password
|
config_get password "$section" 'password'
|
||||||
config_get host "$section" host
|
config_get host "$section" 'host'
|
||||||
config_get update "$section" update
|
config_get update "$section" 'update'
|
||||||
|
|
||||||
[ "$update" = 1 ] && {
|
[ "$update" = 1 ] && {
|
||||||
if [ "$service" = "dyndns" ]; then
|
if [ "$service" = "dyndns" ]; then
|
||||||
@ -22,16 +23,16 @@ start_service () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$abusive" != "1" ]; then
|
if [ "$abusive" != "1" ]; then
|
||||||
/usr/bin/updatedd -Y $service -- $username:$password $host
|
service_start /usr/bin/updatedd -Y $service -- $username:$password $host
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
config_load "updatedd"
|
config_load 'updatedd'
|
||||||
config_foreach start_service updatedd
|
config_foreach start_instance 'updatedd'
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
killall updatedd
|
service_stop /usr/bin/updatedd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user