#
-# 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.
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
#!/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() {
}
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
}