[packages_10.03.2] reaim: merge r28966
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 16:01:17 +0000 (16:01 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 16:01:17 +0000 (16:01 +0000)
SVN-Revision: 30249

net/reaim/Makefile
net/reaim/files/reaim.init

index 120180185f3f22a7b5cb82d94c8ad6f8532ab761..6c5c4abff2f70c5ff7e779a6759410638a04be9f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=reaim
 PKG_VERSION:=0.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/reaim
index d6e8cb72d34f6febaadd49efa70ebfebb3cdaae1..39c0cf8d970ddb4591a5bb66cabcbc1546375a7e 100644 (file)
@@ -1,10 +1,8 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
 START=60
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-NAME=reaim
-DESC="Transparent proxy for IM behind NAT"
+
 IPT=/usr/sbin/iptables
 
 set_rules() {
@@ -20,29 +18,9 @@ set_rules() {
 }
 
 start() {
-       if [ -e /var/run/$NAME.pid ]; then
-               echo "$DESC: $NAME already started."
-               exit 0
-       fi
-       echo -n "Starting $DESC: $NAME"
-       
-       set_rules -A
-       test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid
-       /usr/sbin/$NAME
-       echo "."
+       service_start /usr/sbin/reaim && set_rules -A
 }
 
 stop() {
-       set_rules -D 2>/dev/null >/dev/null
-       
-       if [ ! -e /var/run/$NAME.pid ]; then
-               echo "$DESC: $NAME is not running."
-               exit 0
-       fi
-       echo -n "Stopping $DESC: $NAME"
-
-       killall $NAME
-       rm -f /var/run/$NAME.pid
-
-       echo "."
+       service_stop /usr/sbin/reaim && set_rules -D
 }