Created
September 24, 2016 15:00
-
-
Save larsbratholm/7ab3f31b1dac916c13d23bc5fc4c8ba5 to your computer and use it in GitHub Desktop.
Enable/disable flightmode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "${1,,}" = "on" ] || [ "${1,,}" = "enable" ] || [ "${1,,}" = "1" ]; then | |
arg=0 | |
elif [ "${1,,}" = "off" ] || [ "${1,,}" = "disable" ] || [ "${1,,}" = "0" ]; then | |
arg=1 | |
else echo "Unknown argument: $1"; exit 1 | |
fi | |
nmcli r all $arg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment