[no ci] S99watchdog: enhance boot messages ()

pull/1245/head
gtxaspec 2024-01-09 02:38:38 -08:00 committed by GitHub
parent 77928cb844
commit 523bbd5c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 4 deletions
general/overlay/etc/init.d

View File

@ -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
}