Browse Source

hostapd start and stop

Bob Mottram 8 years ago
parent
commit
22f5ececf8
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/freedombone-mesh-batman

+ 4
- 2
src/freedombone-mesh-batman View File

@@ -145,6 +145,7 @@ function stop {
145 145
         ifconfig $EIFACE down -promisc
146 146
     fi
147 147
     if [ $IFACE_SECONDARY ]; then
148
+        systemctl stop hostapd
148 149
         brctl delif $BRIDGE_HOTSPOT bat0
149 150
         ifconfig $BRIDGE_HOTSPOT down || true
150 151
         brctl delbr $BRIDGE_HOTSPOT
@@ -287,7 +288,7 @@ function start {
287 288
 
288 289
                 sed -i 's|#DAEMON_CONF=.*|DAEMON_CONF="/etc/hostapd/hostapd.conf"|g' /etc/default/hostapd
289 290
 
290
-                echo "interface=$IFACE_SECONDARY" > /etc/hostapd/hostapd.conf
291
+                echo "interface=${IFACE_SECONDARY}" > /etc/hostapd/hostapd.conf
291 292
                 echo "bridge=${BRIDGE_HOTSPOT}" >> /etc/hostapd/hostapd.conf
292 293
                 echo 'driver=nl80211' >> /etc/hostapd/hostapd.conf
293 294
                 echo "country_code=UK" >> /etc/hostapd/hostapd.conf
@@ -305,7 +306,8 @@ function start {
305 306
                 ifconfig $BRIDGE_HOTSPOT up
306 307
                 avahi-autoipd --force-bind --daemonize --wait $BRIDGE_HOTSPOT
307 308
                 ifconfig $IFACE_SECONDARY up promisc
308
-                ifconfig $IFACE_SECONDARY auto-dhcp start
309
+                #ifconfig $IFACE_SECONDARY auto-dhcp start
310
+                systemctl start hostapd
309 311
             fi
310 312
         fi
311 313
     fi