[Feature][T8TSK-202][wifi] modify start scirpts

Change-Id: I886ed9cd2600cd7929624c0e03ecc5b37b80e82f
diff --git a/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh b/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh
index 8fe91f7..cbf3e4c 100755
--- a/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh
+++ b/src/lynq/lib/liblynq-wifi6/scripts/start_stop_ap.sh
@@ -12,13 +12,13 @@
 	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"
+	ps -eo "%p %a" | grep "/usr/bin/dnsmasq -x /run/wg870/dnsmasq.pid" | grep -v grep
 	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
+	ps -eo "%p %a" | grep "/usr/bin/dnsmasq -x /run/wg870/dnsmasq.pid" | grep -v grep | awk '{print "kill "$1}' | sh
 	ifconfig ap0 down
 	if [ $? != 0 ]; then
 		exit 1
@@ -26,3 +26,5 @@
 else
 	exit 2
 fi
+
+exit 0