Changeset 29072


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

packages/autossh: use new service functions

Location:
packages/net/autossh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/autossh/Makefile

    r28018 r29072  
    11# 
    2 # Copyright (C) 2006-2008 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=autossh 
    1111PKG_VERSION:=1.4b 
    12 PKG_RELEASE:=3 
     12PKG_RELEASE:=4 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz 
  • packages/net/autossh/files/autossh.init

    r28018 r29072  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
     3 
    34START=80 
    45 
    5 start_service () { 
     6start_instance() { 
    67        local section="$1" 
    7         config_get ssh "$section" ssh 
    8         config_get gatetime "$section" gatetime 
    9         config_get monitorport "$section" monitorport 
    10         config_get poll "$section" poll 
    118 
    12         AUTOSSH_GATETIME=${gatetime:-"30"} AUTOSSH_POLL=${poll:-"600"} autossh -M ${monitorport:-"20000"} -f ${ssh} 
     9        config_get ssh "$section" 'ssh' 
     10        config_get gatetime "$section" 'gatetime' 
     11        config_get monitorport "$section" 'monitorport' 
     12        config_get poll "$section" 'poll' 
     13 
     14        AUTOSSH_GATETIME="${gatetime:-30}" \ 
     15        AUTOSSH_POLL="${poll:-600"}" \ 
     16        service_start /usr/sbin/autossh -M ${monitorport:-20000} -f ${ssh} 
    1317} 
    1418 
     
    1822 
    1923start() { 
    20         config_load "autossh" 
    21         config_foreach start_service autossh 
     24        config_load 'autossh' 
     25        config_foreach start_instance 'autossh' 
    2226} 
    2327 
    2428stop() { 
    25         killall autossh 
     29        service_stop /usr/sbin/autossh 
    2630} 
Note: See TracChangeset for help on using the changeset viewer.