From e4ff789a502b34926d2e66a3d32cf48f665e9098 Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 29 Mar 2020 15:08:33 +0000 Subject: [PATCH] add check for uap0 interface --- installers/servicestart.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/installers/servicestart.sh b/installers/servicestart.sh index 0d6ea4de..3e7cbadd 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -88,8 +88,12 @@ if [ -r "$CONFIGFILE" ]; then if [ "${config[WifiAPEnable]}" = 1 ]; then if [ "${interface}" = "uap0" ]; then - echo "Removing uap0 interface..." - iw dev uap0 del + + ip link ls up | grep -q 'uap0' &> /dev/null + if [ $? == 0 ]; then + echo "Removing uap0 interface..." + iw dev uap0 del + fi echo "Adding uap0 interface to ${config[WifiManaged]}" iw dev ${config[WifiManaged]} interface add uap0 type __ap