mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Bugfix + cleanup
This commit is contained in:
parent
ce93faa277
commit
fc2375ab18
@ -34,17 +34,17 @@ systemctl stop dhcpcd.service
|
|||||||
|
|
||||||
if [ -r "$CONFIGFILE" ]; then
|
if [ -r "$CONFIGFILE" ]; then
|
||||||
declare -A config
|
declare -A config
|
||||||
while IFS="=" read -r key value; do
|
while IFS=" = " read -r key value; do
|
||||||
config["$key"]="$value"
|
config["$key"]="$value"
|
||||||
done < <(sed -E -e 's/ *= */=/g' "$CONFIGFILE" )
|
done < "$CONFIGFILE"
|
||||||
|
|
||||||
if [[ ${config[WifiAPEnable]} =~ 1 ]]; then
|
if [ "${config[WifiAPEnable]}" = 1 ]; then
|
||||||
if [ "${interface}" = "uap0" ]; then
|
if [ "${interface}" = "uap0" ]; then
|
||||||
echo "Removing uap0 interface..."
|
echo "Removing uap0 interface..."
|
||||||
iw dev uap0 del
|
iw dev uap0 del
|
||||||
|
|
||||||
echo "Adding uap0 interface to ${config[WifiManaged]}"
|
echo "Adding uap0 interface to ${config[WifiManaged]}"
|
||||||
iw dev wlan0 interface add uap0 type __ap
|
iw dev ${config[WifiManaged]} interface add uap0 type __ap
|
||||||
# Bring up uap0 interface
|
# Bring up uap0 interface
|
||||||
ifconfig uap0 up
|
ifconfig uap0 up
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user