Changeset 29069


Ignore:
Timestamp:
2011-11-13T23:16:07+01:00 (5 years ago)
Author:
nico
Message:

packages/updatedd: use new service functions

Location:
packages/net/updatedd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/updatedd/Makefile

    r26155 r29069  
    11# 
    2 # Copyright (C) 2007-2010 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=updatedd 
    1111PKG_VERSION:=2.6 
    12 PKG_RELEASE:=7 
     12PKG_RELEASE:=8 
    1313 
    1414PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ 
  • packages/net/updatedd/files/updatedd.init

    r15247 r29069  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
     3 
    34START=50 
    45 
    5 start_service () { 
     6start_instance () { 
    67        local section="$1" 
    7         config_get service  "$section" service 
    8         config_get username "$section" username 
    9         config_get password "$section" password 
    10         config_get host     "$section" host 
    11         config_get update   "$section" update 
     8        config_get service  "$section" 'service' 
     9        config_get username "$section" 'username' 
     10        config_get password "$section" 'password' 
     11        config_get host     "$section" 'host' 
     12        config_get update   "$section" 'update' 
    1213 
    1314        [ "$update" = 1 ] && { 
     
    2324                fi 
    2425                if [ "$abusive" != "1" ]; then 
    25                         /usr/bin/updatedd -Y $service -- $username:$password $host 
     26                        service_start /usr/bin/updatedd -Y $service -- $username:$password $host 
    2627                fi 
    2728        } 
     
    2930 
    3031start() { 
    31         config_load "updatedd" 
    32         config_foreach start_service updatedd 
     32        config_load 'updatedd' 
     33        config_foreach start_instance 'updatedd' 
    3334} 
    3435 
    3536stop() { 
    36         killall updatedd 
     37        service_stop /usr/bin/updatedd 
    3738} 
Note: See TracChangeset for help on using the changeset viewer.