Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager/root/www/cgi-bin/experimental/quecwatch/disable-quecwatch.sh
Cameron Thompson bb4d75f560 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>
2024-12-11 23:11:41 -05:00

61 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
# Configuration and log directories
CONFIG_DIR="/etc/quecmanager/quecwatch"
QUECWATCH_SCRIPT="${CONFIG_DIR}/quecwatch.sh"
RCLOCAL="/etc/rc.local"
LOG_DIR="/tmp/log/quecwatch"
DEBUG_LOG_FILE="${LOG_DIR}/debug.log"
# Log directory for cleaning process
CLEANUP_LOG_FILE="${LOG_DIR}/cleanup.log"
# Ensure log directory exists
mkdir -p "${LOG_DIR}"
# Function to log cleanup events
log_cleanup() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "${CLEANUP_LOG_FILE}"
}
# Default response headers
echo "Content-type: application/json"
echo ""
# Cleanup function
cleanup_quecwatch() {
# Start logging cleanup process
log_cleanup "Starting QuecWatch cleanup process"
# Stop any running QuecWatch processes
log_cleanup "Stopping QuecWatch processes"
pkill -f "${QUECWATCH_SCRIPT}" >> "${CLEANUP_LOG_FILE}" 2>&1
# Remove QuecWatch script from rc.local
if [ -f "${RCLOCAL}" ]; then
log_cleanup "Removing QuecWatch entries from rc.local"
sed -i '\|/etc/quecmanager/quecwatch/quecwatch.sh|d' "${RCLOCAL}" >> "${CLEANUP_LOG_FILE}" 2>&1
fi
# Remove configuration directory
if [ -d "${CONFIG_DIR}" ]; then
log_cleanup "Removing configuration directory: ${CONFIG_DIR}"
rm -rf "${CONFIG_DIR}" >> "${CLEANUP_LOG_FILE}" 2>&1
fi
# Remove log directory
if [ -d "${LOG_DIR}" ]; then
log_cleanup "Removing log directory: ${LOG_DIR}"
rm -rf "${LOG_DIR}" >> "${CLEANUP_LOG_FILE}" 2>&1
fi
log_cleanup "QuecWatch cleanup completed successfully"
# Optional: Output JSON response
echo '{"status": "success", "message": "QuecWatch disabled and removed"}'
}
# Execute cleanup
cleanup_quecwatch
exit 0