Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager-beta/root/etc/init.d/quecmanager_services
2025-08-24 20:43:13 +08:00

65 lines
1.9 KiB
Bash
Executable File

#!/bin/sh /etc/rc.common
START=49
STOP=10
USE_PROCD=1
# Configuration paths
QUEUE_DIR="/tmp/at_queue"
RESULTS_DIR="$QUEUE_DIR/results"
LOG_DIR="/www/signal_graphs"
start_service() {
# Ensure required directories exist
mkdir -p "$QUEUE_DIR" "$RESULTS_DIR" "$LOG_DIR"
chmod 755 "$QUEUE_DIR" "$RESULTS_DIR" "$LOG_DIR"
# Start the AT Command Queue Manager
echo "Starting AT Command Queue Manager..."
procd_open_instance
procd_set_param command /www/cgi-bin/services/at_queue_manager.sh
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
echo "AT Queue Manager Started"
# Start the Signal Metrics Logger
echo "Starting Signal Metrics Logger..."
procd_open_instance
procd_set_param command /www/cgi-bin/services/log_signal_metrics.sh
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
echo "Signal Metrics Logger started"
# Start the QCAINFO Interpreter
echo "Starting QCAINFO Interpreter..."
procd_open_instance
procd_set_param command /www/cgi-bin/services/network_insights_interpreter.sh
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
echo "QCAINFO Interpreter started"
# Start ping daemon
echo "Starting Ping Daemon..."
procd_open_instance
procd_set_param command /www/cgi-bin/services/ping_daemon.sh
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
echo "Ping Daemon started"
# Memory daemon is now managed dynamically by memory_settings.sh
# It will be added/removed from this file automatically based on user configuration
echo "All QuecManager services Started"
}
stop_service() {
# procd will handle stopping all instances automatically
echo "Stopping QuecManager services."
}