21 lines
580 B
Bash
21 lines
580 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
run_directory=$(dirname "$0")
|
||
|
|
||
|
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
|