Skip to content

Commit

Permalink
Don't "disable" hostapd if it's already disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Sep 22, 2023
1 parent 9b485be commit a965888
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ SetupFPPNetworkConfigViaSystemdNetworkd() {
echo "RouteMetric=${ROUTEMETRIC}" >> $TMPFILE
echo "" >> $TMPFILE
fi

if [ "$DHCPSERVER" == "1" ]; then
echo "[DHCPServer]" >> $TMPFILE
echo "PoolOffset=${DHCPOFFSET}" >> $TMPFILE
Expand Down Expand Up @@ -292,8 +292,12 @@ SetupFPPNetworkConfigViaSystemdNetworkd() {
systemctl reload-or-restart hostapd.service
else
rm -f ${FPPHOME}/media/tmp/wifi-*.ascii
systemctl stop hostapd.service
systemctl disable hostapd.service
HAPDE=$(systemctl is-enabled hostapd)
HAPDA=$(systemctl is-active hostapd)
if [ "$HPDE" == "enabled" ] || [ $"HAPDA" == "active" ]; then
systemctl stop hostapd.service
systemctl disable hostapd.service
fi
fi
}
SetupFPPNetworkConfig () {
Expand Down

0 comments on commit a965888

Please sign in to comment.