[Feature][T8TSK-202][wifi] wifi6.so add support for with/without connman
Change-Id: I81365bbf2f36eeeeb263a9f8d2d524339f184591
diff --git a/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh b/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh
new file mode 100755
index 0000000..8fe91f7
--- /dev/null
+++ b/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if [ "$1" == "start" ]; then
+ ifconfig ap0 192.168.15.1 netmask 255.255.255.240
+
+ if [ $? != 0 ]; then
+ exit 1
+ fi
+ mkdir -p /run/wg870/dnsmasq.d
+ echo "interface=ap0" > /run/wg870/dnsmasq.conf
+ echo "listen-address=127.0.0.1,192.168.15.1" >> /run/wg870/dnsmasq.conf
+ echo "bind-interfaces" >> /run/wg870/dnsmasq.conf
+ echo "localise-queries" >> /run/wg870/dnsmasq.conf
+ echo "dhcp-range=192.168.15.2,192.168.15.14,255.255.255.240,1h" >> /run/wg870/dnsmasq.conf
+ ps -ef | grep "/usr/bin/dnsmasq" | grep "/run/wg870/dnsmasq.conf"
+ if [ $? != 0 ]; then
+ /usr/bin/dnsmasq -x /run/wg870/dnsmasq.pid -7 /run/wg870/dnsmasq.d --local-service -C /run/wg870/dnsmasq.conf -r /run/wg870
+ fi
+
+elif [ "$1" == "stop" ]; then
+ ps -ef | grep "/usr/bin/dnsmasq" | grep "/run/wg870/dnsmasq.conf" | awk '{print $2}' | xargs kill
+ ifconfig ap0 down
+ if [ $? != 0 ]; then
+ exit 1
+ fi
+else
+ exit 2
+fi