From 440e7af33922919e44972f0eb45cd237d3382267 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 13 Jan 2022 08:46:31 +0100 Subject: [PATCH] naywatch: fix mode without watchdog The if-condition was always evaluated to be true. Signed-off-by: Nick Hainke (cherry picked from commit cf34c5a4a1ace3f8eeac2d2b9b8539e085e8fabf) --- naywatch/files/naywatch.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/naywatch/files/naywatch.sh b/naywatch/files/naywatch.sh index 8eea429..e6d2fb7 100644 --- a/naywatch/files/naywatch.sh +++ b/naywatch/files/naywatch.sh @@ -71,7 +71,7 @@ no_neighbors() { return 0 fi - if [ $SAVE_LOGS ]; then + if [ $SAVE_LOGS -eq 1 ]; then log "Saving Logs!" write_logs fi @@ -85,18 +85,18 @@ log "Naywatch Started!" neighbors() { ACTIVE=1 - if [ $USE_WATCHDOG ]; then + if [ $USE_WATCHDOG -eq 1 ]; then echo 1 >&3 fi } not_active() { - if [ $USE_WATCHDOG ]; then + if [ $USE_WATCHDOG -eq 1 ]; then echo 1 >&3 fi } -if [ $USE_WATCHDOG ]; then +if [ $USE_WATCHDOG -eq 1 ]; then activate_watchdog fi -- 2.30.2