Forgot to save

main
Jason Hawks 1 year ago
parent 02799a6359
commit fc45fc736c

@ -2,8 +2,9 @@
# Dumb AP Mode Block
set_apmode() {
AP_MODE=$(uci -q get easymesh.config.ap_mode)
if [ "$AP_MODE" = 1 ]; then
touch /root/.madeap
# AP_MODE=$(uci -q get easymesh.config.ap_mode)
# if [ "$AP_MODE" = 1 ]; then
# Set a flag to indicate that we are in AP mode
# When we go to disable easymesh, we will check this flag and if it was set we restore settings
uci set easymesh.config.ap_mode_enabled=1
@ -71,38 +72,38 @@ set_apmode() {
# Tell openwrt to reload the configs
reload_config
/etc/init.d/network reload
else
# Set a flag to indicate that we are in AP mode
uci set easymesh.config.ap_mode_enabled=0
# Restore our configs
[ -f /etc/config/wireless.meshbak ] && {
mv /etc/config/wireless /etc/config/wireless.dumbap
cp /etc/config/wireless.meshbak /etc/config/wireless
}
[ -f /etc/config/network.meshbak ] && {
mv /etc/config/network /etc/config/network.dumbap
cp /etc/config/network.meshbak /etc/config/network
}
[ -f /etc/config/dhcp.meshbak ] && {
mv /etc/config/dhcp /etc/config/dhcp.dumbap
cp /etc/config/dhcp.meshbak /etc/config/dhcp
}
# Enable and start services not needed
for service in firewall dnsmasq odhcpd; do
if /etc/init.d/$service disabled; then
echo "Enabling and starting $service..."
/etc/init.d/$service enable
/etc/init.d/$service start
else
echo "$service is not disabled, skipping..."
fi
done
# else
# # Set a flag to indicate that we are in AP mode
# uci set easymesh.config.ap_mode_enabled=0
# # Restore our configs
# [ -f /etc/config/wireless.meshbak ] && {
# mv /etc/config/wireless /etc/config/wireless.dumbap
# cp /etc/config/wireless.meshbak /etc/config/wireless
# }
# [ -f /etc/config/network.meshbak ] && {
# mv /etc/config/network /etc/config/network.dumbap
# cp /etc/config/network.meshbak /etc/config/network
# }
# [ -f /etc/config/dhcp.meshbak ] && {
# mv /etc/config/dhcp /etc/config/dhcp.dumbap
# cp /etc/config/dhcp.meshbak /etc/config/dhcp
# }
# # Enable and start services not needed
# for service in firewall dnsmasq odhcpd; do
# if /etc/init.d/$service disabled; then
# echo "Enabling and starting $service..."
# /etc/init.d/$service enable
# /etc/init.d/$service start
# else
# echo "$service is not disabled, skipping..."
# fi
# done
reload_config
/etc/init.d/network reload
fi
# reload_config
# /etc/init.d/network reload
# fi
}
clear_mesh_radio() {

Loading…
Cancel
Save