aredn/files/usr/local/bin/bbhnrecoverymode

21 lines
515 B
Plaintext
Raw Normal View History

#!/bin/sh
DHCPLANSECTION=`uci show dhcp|grep interface=lan|sed "s/dhcp.\@dhcp\[\(.*\)\].interface=lan/\1/"`
logger "BBHN Recovery: Reseting password to BBHN default"
/usr/local/bin/setpasswd hsmm
logger "BBHN Recovery: Restarting uhttpd"
/etc/init.d/uhttpd restart
if [ "$DHCPLANSECTION" != "" ]
then
logger "BBHN Recovery: Enable DHCP on lan interface"
uci set dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0
uci -q commit
logger "BBHN Recovery: Restart dnsmasq"
/etc/init.d/dnsmasq restart
fi