Changeset 28966


Ignore:
Timestamp:
2011-11-12T02:30:23+01:00 (6 years ago)
Author:
nico
Message:

packages/reaim: use new service functions

Location:
packages/net/reaim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/reaim/Makefile

    r19705 r28966  
    11# 
    2 # Copyright (C) 2006 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:=reaim 
    1111PKG_VERSION:=0.8 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/reaim/files/reaim.init

    r15247 r28966  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33 
    44START=60 
    5 PATH=/sbin:/bin:/usr/sbin:/usr/bin 
    6 NAME=reaim 
    7 DESC="Transparent proxy for IM behind NAT" 
     5 
    86IPT=/usr/sbin/iptables 
    97 
     
    2119 
    2220start() { 
    23         if [ -e /var/run/$NAME.pid ]; then 
    24                 echo "$DESC: $NAME already started." 
    25                 exit 0 
    26         fi 
    27         echo -n "Starting $DESC: $NAME" 
    28          
    29         set_rules -A 
    30         test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid 
    31         /usr/sbin/$NAME 
    32         echo "." 
     21        service_start /usr/sbin/reaim && set_rules -A 
    3322} 
    3423 
    3524stop() { 
    36         set_rules -D 2>/dev/null >/dev/null 
    37          
    38         if [ ! -e /var/run/$NAME.pid ]; then 
    39                 echo "$DESC: $NAME is not running." 
    40                 exit 0 
    41         fi 
    42         echo -n "Stopping $DESC: $NAME" 
    43  
    44         killall $NAME 
    45         rm -f /var/run/$NAME.pid 
    46  
    47         echo "." 
     25        service_stop /usr/sbin/reaim && set_rules -D 
    4826} 
Note: See TracChangeset for help on using the changeset viewer.