mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-13 10:22:04 +00:00
Avoid kill-wpa.sh to exit script when sourced and there is no wpa_supplicant connection Avoid false positives on wpa_supplicant detection
18 lines
309 B
Bash
Executable file
18 lines
309 B
Bash
Executable file
#!/bin/bash
|
|
|
|
. miracle-utils.sh
|
|
|
|
kill_ubuntu_network_manager
|
|
|
|
WPA_PID=$(find_wpa_supplicant_pid)
|
|
if [ -n "$WPA_PID" ]
|
|
then
|
|
echo killing existing wpa_supplicant connection
|
|
sudo kill -9 $WPA_PID
|
|
else
|
|
echo cannot find wpa_supplicant connection to kill
|
|
if [[ $_ == $0 ]]
|
|
then
|
|
exit 1
|
|
fi
|
|
fi
|