Files
wlan-ap/feeds/wlan-ap/interAPcomm/files/interap.init
Chaitanya Godavarthi 93baf6d334 apc:Fix AP not receiving hello packets
Fix firewall setting not being applied.
return incase the interap socket fails.
Clean up in failure conditions.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-05-12 15:38:31 -04:00

36 lines
847 B
Bash

#!/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
}