Skip to content
Snippets Groups Projects
Commit 22f5ecec authored by Bob Mottram's avatar Bob Mottram
Browse files

hostapd start and stop

parent fa555ce4
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,7 @@ function stop {
ifconfig $EIFACE down -promisc
fi
if [ $IFACE_SECONDARY ]; then
systemctl stop hostapd
brctl delif $BRIDGE_HOTSPOT bat0
ifconfig $BRIDGE_HOTSPOT down || true
brctl delbr $BRIDGE_HOTSPOT
......@@ -287,7 +288,7 @@ function start {
sed -i 's|#DAEMON_CONF=.*|DAEMON_CONF="/etc/hostapd/hostapd.conf"|g' /etc/default/hostapd
echo "interface=$IFACE_SECONDARY" > /etc/hostapd/hostapd.conf
echo "interface=${IFACE_SECONDARY}" > /etc/hostapd/hostapd.conf
echo "bridge=${BRIDGE_HOTSPOT}" >> /etc/hostapd/hostapd.conf
echo 'driver=nl80211' >> /etc/hostapd/hostapd.conf
echo "country_code=UK" >> /etc/hostapd/hostapd.conf
......@@ -305,7 +306,8 @@ function start {
ifconfig $BRIDGE_HOTSPOT up
avahi-autoipd --force-bind --daemonize --wait $BRIDGE_HOTSPOT
ifconfig $IFACE_SECONDARY up promisc
ifconfig $IFACE_SECONDARY auto-dhcp start
#ifconfig $IFACE_SECONDARY auto-dhcp start
systemctl start hostapd
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment