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