1234567891011121314151617181920212223242526272829303132333435 |
- #!/bin/sh
- #PKG reaim
- #INIT 75
- . /etc/rc.conf
- IPT=/usr/sbin/iptables
- WAN=${reaim_flags}
- case $1 in
- autostop) ;;
- autostart)
- test x"${reaim:-NO}" = x"NO" && exit 0
- test x"$reaim" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
- exec sh $0 start
- ;;
- start)
- $IPT -A input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
- $IPT -A input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
- $IPT -A input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT
- $IPT -A input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT
- /usr/sbin/reaim
- ;;
- stop)
- kill $(pgrep -f /usr/sbin/reaim)
- ;;
- restart)
- sh $0 stop
- sh $0 start
- ;;
- *)
- echo "Usage: $0 {start | stop | restart}"
- exit 1
- ;;
- esac
- exit $?
|