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>
29 lines
851 B
Bash
Executable File
29 lines
851 B
Bash
Executable File
#!/bin/sh
|
|
# save-config.sh
|
|
echo "Content-Type: application/json"
|
|
echo ""
|
|
|
|
# Read POST data
|
|
read -n $CONTENT_LENGTH POST_DATA
|
|
|
|
# Configuration file path
|
|
CONFIG_FILE="/etc/quecManager.conf"
|
|
|
|
# Parse JSON input and update config file
|
|
AT_PORT=$(echo "$POST_DATA" | grep -o '"AT_port":"[^"]*"' | cut -d'"' -f4)
|
|
AT_PORT_CUSTOM=$(echo "$POST_DATA" | grep -o '"AT_port_custom":"[^"]*"' | cut -d'"' -f4)
|
|
DATA_REFRESH_RATE=$(echo "$POST_DATA" | grep -o '"data_refresh_rate":"[^"]*"' | cut -d'"' -f4)
|
|
|
|
# Create new config content
|
|
cat > "$CONFIG_FILE" << EOF
|
|
AT_port = $AT_PORT
|
|
AT_port_custom = $AT_PORT_CUSTOM
|
|
data_refresh_rate = $DATA_REFRESH_RATE
|
|
EOF
|
|
|
|
# Check if write was successful
|
|
if [ $? -eq 0 ]; then
|
|
echo '{"success": true, "message": "Configuration saved successfully"}'
|
|
else
|
|
echo '{"success": false, "error": "Failed to save configuration"}'
|
|
fi |