From 037d978bb8e725433ac692a56c90cf1733d19c12 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 14 Aug 2021 17:47:07 +0000 Subject: [PATCH] wtf is this cr*p --- Makefile | 2 ++ setnet.sh | 6 +++--- wpa_setnet.conf | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ea163bf..b1f5e30 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,9 @@ install: install -m0644 setnetrc $(SYSCONFDIR)/setnetrc install -m0755 setnet.sh $(DESTDIR)$(PREFIX)/bin/setnet install -m0644 setnet.8.gz $(DESTDIR)$(MANDIR)/man8/setnet.8.gz + install -m0644 wpa_setnet.conf $(SYSCONFDIR)/wpa_supplicant/wpa_setnet.conf uninstall: rm -v $(SYSCONFDIR)/setnetrc rm -v $(DESTDIR)$(PREFIX)/bin/setnet rm -v $(DESTDIR)$(MANDIR)/man8/setnet.8.gz + rm -v $(SYSCONFDIR)/wpa_supplicant/wpa_setnet.conf diff --git a/setnet.sh b/setnet.sh index 449221a..b4aa9f5 100755 --- a/setnet.sh +++ b/setnet.sh @@ -985,12 +985,12 @@ wifi_restart_wpa() { DEVNAME=$1 WPA_FILE=$2 WPA_PID=$(ps ax | grep wpa_supplicant | grep " -i ${DEVNAME} " | sed -r -e 's/^\ +//g' | cut -d " " -f 1) - WPA_CLI_PID=$(ps ax | grep wpa_cli | grep "-a /etc/wpa_supplicant/wpa_cli.sh " | sed -r -e 's/^\ +//g' | cut -d " " -f 1) + WPA_CLI_PID=$(ps ax | grep wpa_cli | grep " -a /etc/wpa_supplicant/wpa_cli.sh " | sed -r -e 's/^\ +//g' | cut -d " " -f 1) if [ -n "wpa_supplicant" ]; then log "wifi_restart_wpa" "WPA_PID: ${WPA_PID}" - kill -9 ${WPA_PID} - kill -9 ${WPA_CLI_PID} + pkill ${WPA_PID} 2>/dev/null + pkill ${WPA_CLI_PID} 2>/dev/null else log "wifi_restart_wpa" "no wpa_supplicant is running!!!" fi diff --git a/wpa_setnet.conf b/wpa_setnet.conf index 07d4b6d..a1c891f 100644 --- a/wpa_setnet.conf +++ b/wpa_setnet.conf @@ -1,3 +1,6 @@ ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=wheel +eapol_version=1 +fast_reauth=1 update_config=1 - +ap_scan=1