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>
38 lines
988 B
Bash
Executable File
38 lines
988 B
Bash
Executable File
#!/bin/sh
|
|
# Set the content type to JSON
|
|
echo "Content-Type: application/json"
|
|
echo ""
|
|
|
|
# Configuration file path
|
|
CONFIG_FILE="/etc/quecManager.conf"
|
|
|
|
# Check if the config file exists
|
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
echo '{"error": "Configuration file not found"}'
|
|
exit 1
|
|
fi
|
|
|
|
# Initialize variables
|
|
AT_PORT=""
|
|
AT_PORT_CUSTOM=""
|
|
DATA_REFRESH_RATE=""
|
|
|
|
# Read the config file line by line and extract values
|
|
while IFS='=' read -r key value; do
|
|
# Remove leading/trailing whitespace
|
|
key=$(echo "$key" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
value=$(echo "$value" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
|
|
case "$key" in
|
|
"AT_port") AT_PORT="$value" ;;
|
|
"AT_port_custom") AT_PORT_CUSTOM="$value" ;;
|
|
"data_refresh_rate") DATA_REFRESH_RATE="$value" ;;
|
|
esac
|
|
done <"$CONFIG_FILE"
|
|
|
|
# Output JSON
|
|
echo "{"
|
|
echo " \"AT_port\": \"$AT_PORT\","
|
|
echo " \"AT_port_custom\": \"$AT_PORT_CUSTOM\","
|
|
echo " \"data_refresh_rate\": $DATA_REFRESH_RATE"
|
|
echo "}" |