From ada34b7706e9aaa3d66997bc6fc91bfda3265b30 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 20 Apr 2021 21:57:30 +0100 Subject: Replace manual wifi with automatic iwd --- .local/bin/wifi | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 .local/bin/wifi (limited to '.local') diff --git a/.local/bin/wifi b/.local/bin/wifi deleted file mode 100755 index 0a067ab..0000000 --- a/.local/bin/wifi +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# root check -if [ "$EUID" -ne 0 ]; then echo "Please run as root" && exit; fi - -# variables -interface=$(ip a | awk -F": " '/wlp/ {print $2}') -runfile=/run/wpa_supplicant/$interface -ping_test=1.1.1.1 - -# existing connection check -ping -c 1 "$ping_test" && printf "\nAlready connceted!" && exit - -# runfile check -if [ -f "$runfile" ] ; then echo Removing Runfile && rm "$runfile" ; fi - -# make connection -wpa_supplicant -B -c "/etc/wpa_supplicant/wpa_supplicant.conf" -i "$interface" && dhcpcd "$interface" - -# ping test -while true; do sleep 0.8 && ping -c 1 "$ping_test" && printf "\nConnected!" && break; done - -exit -- cgit v1.2.3