libunwind: update to 1.8.1
[openadk.git] / package / reaim / files / reaim.init
blobdafe7caa6b14ae94069de37a22906c6376bfd7e6
1 #!/bin/sh
2 #PKG reaim
3 #INIT 75
4 . /etc/rc.conf
6 IPT=/usr/sbin/iptables
7 WAN=${reaim_flags}
9 case $1 in
10 autostop) ;;
11 autostart)
12 test x"${reaim:-NO}" = x"NO" && exit 0
13 test x"$reaim" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
14 exec sh $0 start
16 start)
17 $IPT -A input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
18 $IPT -A input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
19 $IPT -A input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT
20 $IPT -A input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT
21 /usr/sbin/reaim
23 stop)
24 kill $(pgrep -f /usr/sbin/reaim)
26 restart)
27 sh $0 stop
28 sh $0 start
31 echo "Usage: $0 {start | stop | restart}"
32 exit 1
34 esac
35 exit $?