From 8a49ee9a53d1a2e1b0386498f890f3f52f596ab1 Mon Sep 17 00:00:00 2001 From: Cobrijani Date: Wed, 19 Jun 2019 21:06:17 +0000 Subject: [PATCH] corrected check status --- entry.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/entry.sh b/entry.sh index cfaa7b3..42c3ea5 100755 --- a/entry.sh +++ b/entry.sh @@ -19,9 +19,12 @@ echo "Check Repo status $status" if [ $status != 0 ]; then echo "Restic repository '${RESTIC_REPOSITORY}' does not exists. Running restic init." - restic init | true + restic init - if [ $? != 0 ]; then + init_status=$? + echo "Repo init status $init_status" + + if [ $init_status != 0 ]; then echo "Failed to init the repository: '${RESTIC_REPOSITORY}'" exit 1 fi