Release Candidate for 2.3.0
This commit is contained in:
@@ -8,14 +8,17 @@ set -eu
|
||||
# Ensure PATH for OpenWrt/BusyBox
|
||||
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
|
||||
|
||||
# Load centralized logging
|
||||
. /www/cgi-bin/services/quecmanager_logger.sh
|
||||
|
||||
# Configuration
|
||||
TMP_DIR="/tmp/quecmanager"
|
||||
OUT_JSON="$TMP_DIR/memory.json"
|
||||
PID_FILE="$TMP_DIR/memory_daemon.pid"
|
||||
LOG_FILE="$TMP_DIR/memory_daemon.log"
|
||||
CONFIG_FILE="/etc/quecmanager/settings/memory_settings.conf"
|
||||
[ -f "$CONFIG_FILE" ] || CONFIG_FILE="/tmp/quecmanager/settings/memory_settings.conf"
|
||||
DEFAULT_INTERVAL=1
|
||||
SCRIPT_NAME="memory_daemon"
|
||||
|
||||
# Ensure temp directory exists
|
||||
ensure_tmp_dir() {
|
||||
@@ -24,7 +27,7 @@ ensure_tmp_dir() {
|
||||
|
||||
# Logging function
|
||||
log() {
|
||||
printf '%s - %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$1" >> "$LOG_FILE" 2>/dev/null || true
|
||||
qm_log_info "daemon" "$SCRIPT_NAME" "$1"
|
||||
}
|
||||
|
||||
# Check if this daemon instance is already running
|
||||
|
||||
Reference in New Issue
Block a user