mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-11-19 16:55:19 +00:00
corrected check status
This commit is contained in:
1 parent
6bedee1ab1
commit
8a49ee9a53
1 file changed
+5
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user