Created
March 15, 2018 01:50
-
-
Save zanculmarktum/7a2a854d146e4018587041584d9ddd59 to your computer and use it in GitHub Desktop.
Adds a telkampret connection to NetworkManager.
This file contains hidden or 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
#!/bin/sh | |
# Adds a telkampret connection to NetworkManager. | |
if [ "$(id -u)" != "0" ]; then | |
echo "${0##*/}: super user access required" >&2 | |
exit 1 | |
fi | |
if ! which nmcli >/dev/null 2>&1; then | |
echo "${0##*/}: NetworkManager is not installed" >&2 | |
exit 1 | |
fi | |
if nmcli c show telkampret >/dev/null 2>&1; then | |
echo "${0##*/}: telkampret: connection already exists" >&2 | |
exit 1 | |
fi | |
nmcli c add \ | |
type gsm \ | |
ifname '*' \ | |
con-name telkampret \ | |
autoconnect no \ | |
apn telkomsel \ | |
user wap \ | |
password wap123 \ | |
gsm.number '*99#' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment