#!/bin/sh /etc/rc.common START=12 STOP=12 start() { apc=`cat /etc/config/firewall | grep Allow-APC` ucc=`cat /etc/config/firewall | grep Allow-UCC` if [ -z "$apc" ]; then uci add firewall rule uci set firewall.@rule[-1].name='Allow-APC' uci set firewall.@rule[-1].src='wan' uci set firewall.@rule[-1].proto='udp' uci set firewall.@rule[-1].dst_port='50010' uci set firewall.@rule[-1].target='ACCEPT' uci set firewall.@rule[-1].family='ipv4' uci commit firewall fi if [ -z "$ucc" ]; then uci add firewall rule uci set firewall.@rule[-1].name='Allow-UCC' uci set firewall.@rule[-1].src='wan' uci set firewall.@rule[-1].proto='udp' uci set firewall.@rule[-1].dst_port='50000' uci set firewall.@rule[-1].target='ACCEPT' uci set firewall.@rule[-1].family='ipv4' uci commit firewall fi } stop() { echo stop }