3 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
5 DESC
="Transparent proxy for IM behind NAT"
7 WAN
=$
(nvram get wan_ifname
)
11 if [ -e /var
/run
/$NAME.pid
]; then
12 echo "$DESC: $NAME already started."
15 echo -n "Starting $DESC: $NAME"
16 $IPT -A input_rule
-i $WAN -p tcp
--dport 1863:1864 -j ACCEPT
17 $IPT -A input_rule
-i $WAN -p tcp
--dport 4443 -j ACCEPT
18 $IPT -A input_rule
-i $WAN -p tcp
--dport 5566 -j ACCEPT
19 $IPT -A input_rule
-i $WAN -p tcp
--dport 40000:40099 -j ACCEPT
21 test -e /var
/run
/$NAME.pid ||
touch /var
/run
/$NAME.pid
27 if [ ! -e /var
/run
/$NAME.pid
]; then
28 echo "$DESC: $NAME is not running."
31 echo -n "Stopping $DESC: $NAME"
33 rm -f /var
/run
/$NAME.pid
39 if [ ! -e /var
/run
/$NAME.pid
]; then
43 echo -n "Restarting $DESC: $NAME"
44 $IPT -A input_rule
-i $WAN -p tcp
--dport 1863:1864 -j ACCEPT
45 $IPT -A input_rule
-i $WAN -p tcp
--dport 4443 -j ACCEPT
46 $IPT -A input_rule
-i $WAN -p tcp
--dport 5566 -j ACCEPT
47 $IPT -A input_rule
-i $WAN -p tcp
--dport 40000:40099 -j ACCEPT
56 echo "Usage: $N {start|stop|restart|force-reload}" >&2
This page took 0.047283 seconds and 5 git commands to generate.