Files
quectel-rgmii-toolkit/ttyd/scripts/ICCIDfun.sh
iamromulan 780590bfa5 Combine Dependencies; Other Improvements
-Removed CPU intensive python based telnet server option
-Removed Micropython
-Renamed AT Telnet Daemon socat-at bridge
-Moved TTL related files not part of the www/cgi-bin directory to /simplefirewall
-Improved Simplefirewall menu, added ability to change TTL
-Combined uninstall and install functions for simpleadmin and dependencies into single functions
2024-02-20 23:44:05 -05:00

22 lines
710 B
Bash

edit_iccid_file() {
local iccid_file="/path/to/iccid_master_file" # Path to the ICCID-APN-IPType master file
echo "Enter ICCID to add or edit:"
read iccid
echo "Enter APN for $iccid:"
read apn
echo "Enter IP Type (IPV4, IPV6, IPV4V6) for $iccid [Default: IPV4V6]:"
read iptype
iptype=${iptype:-"IPV4V6"} # Default to IPV4V6 if not specified
# Check if ICCID already exists
if grep -q "$iccid" "$iccid_file"; then
# Update existing ICCID's APN and IP Type
sed -i "/$iccid/c\\$iccid,$apn,$iptype" "$iccid_file"
else
# Add new ICCID, APN, and IP Type
echo "$iccid,$apn,$iptype" >> "$iccid_file"
fi
echo "ICCID file updated."
}