ucentral-schema: fix onlinecheck init script to prevent boot log spam

Add quiet flag to uci command and check for empty interval to suppress
error messages when onlinecheck configuration doesn't exist, preventing
unnecessary log spam during boot.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2025-10-19 00:00:00 +02:00
parent 3f57866846
commit aed20d2516

View File

@@ -6,7 +6,8 @@ USE_PROCD=1
PROG=/usr/bin/ucode
start_service() {
local interval=$(uci get onlinecheck.@config[-1].check_interval)
local interval=$(uci -q get onlinecheck.@config[-1].check_interval)
[ -z "$interval" ] && return 0
procd_open_instance
procd_set_param command "$PROG" -l uci -l fs /usr/share/ucentral/onlinecheck.uc
procd_set_param respawn 1 $interval 0