2022-03-16 18:22:50 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-09-22 18:46:49 +02:00
|
|
|
run_directory=$(dirname $(readlink -f "$0"))
|
2022-03-16 18:22:50 +01:00
|
|
|
|
|
|
|
if [ -f $run_directory/.disabled ]; then
|
|
|
|
echo "Installation is disabled. Exiting..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Copying script to NetworkManager directory..."
|
|
|
|
sudo cp $run_directory/auto-disable-wifi.sh /etc/NetworkManager/dispatcher.d/99-auto-disable-wifi
|
|
|
|
sudo chown root:root /etc/NetworkManager/dispatcher.d/99-auto-disable-wifi
|
|
|
|
sudo chmod 744 /etc/NetworkManager/dispatcher.d/99-auto-disable-wifi
|
|
|
|
|
|
|
|
if ! command -v rfkill &> /dev/null; then
|
|
|
|
echo "WARNING: rfkill is not installed."
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Finished install. Exiting..."
|
|
|
|
exit 0
|