QuecManger 1.0.0
Release Notes: Enhanced Web App Architecture: - Optimized the structure for better scalability and maintainability. - Refined Data Fetching Logic: Improved the efficiency and reliability of data retrieval processes. - Optimized AT Terminal: Enhanced functionality for smoother interaction with AT commands. - Revamped UI/UX Design: Streamlined user interface and experience for improved accessibility and usability. New Features: - MTU Settings: Added customizable Maximum Transmission Unit (MTU) settings. - APN and IMEI Profiles: Introduced the ability to configure APN and IMEI profiles for better device management. - Persistent Cell Locking: Added native support for persistent cell locking, ensuring consistent network connections. - QuecWatch: Connection monitoring with auto reconnect and reboot settable Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
echo "Content-type: application/json"
|
||||
echo ""
|
||||
|
||||
CONFIG_FILE="/etc/quecmanager/imei_profile/imei_config.txt"
|
||||
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
echo "{}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Read the configuration file
|
||||
iccidProfile1=$(grep "^iccidProfile1=" "$CONFIG_FILE" | cut -d'=' -f2)
|
||||
imeiProfile1=$(grep "^imeiProfile1=" "$CONFIG_FILE" | cut -d'=' -f2)
|
||||
iccidProfile2=$(grep "^iccidProfile2=" "$CONFIG_FILE" | cut -d'=' -f2)
|
||||
imeiProfile2=$(grep "^imeiProfile2=" "$CONFIG_FILE" | cut -d'=' -f2)
|
||||
|
||||
# Build the JSON response
|
||||
echo "{"
|
||||
|
||||
# Add Profile 1 if it exists
|
||||
if [ -n "$iccidProfile1" ]; then
|
||||
echo " \"profile1\": {"
|
||||
echo " \"iccid\": \"$iccidProfile1\","
|
||||
echo " \"imei\": \"$imeiProfile1\""
|
||||
echo " }"
|
||||
# Add comma if Profile 2 exists
|
||||
[ -n "$iccidProfile2" ] && echo " ,"
|
||||
fi
|
||||
|
||||
# Add Profile 2 if it exists
|
||||
if [ -n "$iccidProfile2" ]; then
|
||||
echo " \"profile2\": {"
|
||||
echo " \"iccid\": \"$iccidProfile2\","
|
||||
echo " \"imei\": \"$imeiProfile2\""
|
||||
echo " }"
|
||||
fi
|
||||
|
||||
echo "}"
|
||||
Reference in New Issue
Block a user