#!/bin/sh

[ -z "$ROOT" ] && ROOT=/www
SCRIPT=$ROOT/script
CONFIG=$ROOT/config

cat > $CONFIG/ng.conf <<- EOM
SSID1_ENABLED='1'
SSID1_ENABLE_RADIO='1'
SSID1_ENABLE_RADIO_5G='1'
SSID1_HIDDEN='0'
SSID1_ISOLATE='1'
SSID1_SSID='#MegaNet Free'
SSID1_MODE='A'
SSID1_IP='10.14.0.1'
SSID1_NETMASK='255.255.0.0'
SSID1_DHCP='1'
SSID1_DHCP_START='50'
SSID1_DHCP_LIMIT='100'
SSID1_DHCP_LEASETIME='2'
SSID1_DHCP_LEASETIME_UNIT='h'
SSID2_ENABLED='0'
SSID3_ENABLED='0'
WAN_PROTO='dhcp'
LAN2_IP='192.168.102.1'
LAN2_NETMASK='255.255.255.0'
LAN2_DHCP='1'
LAN2_DHCP_START='50'
LAN2_DHCP_LIMIT='100'
LAN2_DHCP_LEASETIME='2'
LAN2_DHCP_LEASETIME_UNIT='h'
DNS_DNS1='1.1.1.1'
DNS_DNS2='1.0.0.1'
WIRELESS_CHANNEL='auto'
WIRELESS_CHANNEL_5G='auto'
WIRELESS_POWER='18'
WIRELESS_POWER_5G='23'
WIRELESS_HTMODE='HT40'
WIRELESS_HTMODE_5G='VHT80'
HASH_CONFIG_SITE='none'
EOM

echo > $CONFIG/mqtt.conf

$SCRIPT/update/apply-config.sh