From f459a7c4be1e9bb85e18510cb7bea4ad005897fc Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 9 May 2017 13:54:35 +0200 Subject: [PATCH] [fix] update can now touch /target/sync (removed exit before) --- update | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/update b/update index 2d19ef9..b3e72e1 100755 --- a/update +++ b/update @@ -8,13 +8,17 @@ source $__DIR__/lib/include/bash/func; # [1] Send data + fetch configuration if [ ! -e /target/sync ]; then - test "$($SOURCE_DIR/lib/api/init)" = "127" && slog "init failed" - "update" && exit; - test $? -ne 0 && exit 127; + $SOURCE_DIR/lib/api/init; + + if [ $? -ne 0 ]; then + slog "init failed" - "update"; + exit 127; + fi; touch /target/sync; else - test "$($SOURCE_DIR/lib/api/sync)" = "127" && slog "sync failed" - "update" && exit; + test "$($SOURCE_DIR/lib/api/sync)" = "127"; && slog "sync failed" - "update" && exit; test $? -ne 0 && exit 127; fi;