1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Check for presence of raspap/hostapd.ini

This commit is contained in:
billz 2019-04-19 12:23:05 +00:00
parent f73dcd4e99
commit b54289098e

View File

@ -31,30 +31,30 @@ systemctl stop hostapd.service
systemctl stop dnsmasq.service systemctl stop dnsmasq.service
systemctl stop dhcpcd.service systemctl stop dhcpcd.service
source <(grep = /etc/raspap/hostapd.ini | sed 's/ *= */=/g') if [ -f /etc/raspap/hostapd.ini ]; then
if [ $WifiAPEnable = 1 ]; then source <(grep = /etc/raspap/hostapd.ini | sed 's/ *= */=/g')
if [ "${interface}" = "uap0" ]; then if [ $WifiAPEnable = 1 ]; then
echo "Removing uap0 interface..." if [ "${interface}" = "uap0" ]; then
iw dev uap0 del echo "Removing uap0 interface..."
iw dev uap0 del
echo "Adding uap0 interface..." echo "Adding uap0 interface..."
iw dev wlan0 interface add uap0 type __ap iw dev wlan0 interface add uap0 type __ap
# Bring up uap0 interface # Bring up uap0 interface
ifconfig uap0 up ifconfig uap0 up
fi
fi fi
fi fi
# Start services, mitigating race conditions # Start services, mitigating race conditions
echo "Starting hostapd service..." echo "Starting network services..."
systemctl start hostapd.service systemctl start hostapd.service
sleep "${seconds}" sleep "${seconds}"
echo "Starting dhcpcd service..."
systemctl start dhcpcd.service systemctl start dhcpcd.service
sleep "${seconds}" sleep "${seconds}"
echo "Starting dnsmasq service..."
systemctl start dnsmasq.service systemctl start dnsmasq.service
echo "RaspAP service start DONE" echo "RaspAP service start DONE"