From 523bbd5c97ec7b355563de9c80dc8bec704397e2 Mon Sep 17 00:00:00 2001 From: gtxaspec Date: Tue, 9 Jan 2024 02:38:38 -0800 Subject: [PATCH] [no ci] S99watchdog: enhance boot messages (#1241) --- general/overlay/etc/init.d/S99watchdog | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/general/overlay/etc/init.d/S99watchdog b/general/overlay/etc/init.d/S99watchdog index 0c247260..c23d0b8a 100755 --- a/general/overlay/etc/init.d/S99watchdog +++ b/general/overlay/etc/init.d/S99watchdog @@ -18,12 +18,22 @@ vendor_supported() { start() { - if vendor_supported && [ "$(cli -g .watchdog.enabled)" = "false" ] && [ "$WATCHDOG_ENABLED" = "true" ]; then + if [ "$(cli -g .watchdog.enabled)" = "true" ]; then printf "Starting ${DAEMON}: " - start-stop-daemon -S -q -x "/sbin/${DAEMON}" -- ${WATCHDOG_ARGS} - [ $? = 0 ] && echo "OK" || echo "FAIL" + echo "majestic watchdog enabled" + exit 0 + fi + + if vendor_supported && [ "$WATCHDOG_ENABLED" = "true" ]; then + printf "Starting ${DAEMON}: " + start-stop-daemon -b -S -q -x "/sbin/${DAEMON}" -- ${WATCHDOG_ARGS} + if [ $? = 0 ]; then + echo "OK" + else + echo "FAIL" + fi else - echo "Watchdog: System watchdog disabled, unsupported vendor or Majestic Watchdog enabled" + echo "Watchdog: System watchdog disabled" exit 0 fi }