#!/usr/bin/bash if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then echo "Usage: $0 name" echo "check ip link" exit 1 fi DEV=${1:-"cdc-wnm0"} NAME="mywwan" echo "systemctl enable --now ModemManager" echo "systemctl restart --now NetworkManager" echo "nmcli con add type gsm ifname $DEV con-name $NAME apn data.lycamobile.fr" nmcli c up $NAME exit 0