From 23cf8f381a5e9c6d685bfef1ab10bc451c3bb368 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 3 Nov 2023 11:13:23 +0100 Subject: [PATCH] fail on install error --- infrastructure/backup/image/resources/backup.sh | 2 +- infrastructure/backup/image/resources/init.sh | 2 ++ infrastructure/backup/image/resources/install.sh | 2 ++ infrastructure/backup/image/resources/restic-snapshots.sh | 2 +- infrastructure/backup/image/resources/restore.sh | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/infrastructure/backup/image/resources/backup.sh b/infrastructure/backup/image/resources/backup.sh index d2549fd..f4f0ce6 100755 --- a/infrastructure/backup/image/resources/backup.sh +++ b/infrastructure/backup/image/resources/backup.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -o pipefail +set -eux pipefail function main() { file_env AWS_ACCESS_KEY_ID diff --git a/infrastructure/backup/image/resources/init.sh b/infrastructure/backup/image/resources/init.sh index 1f47fa5..5def4aa 100755 --- a/infrastructure/backup/image/resources/init.sh +++ b/infrastructure/backup/image/resources/init.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -eux pipefail + function main() { file_env AWS_ACCESS_KEY_ID file_env AWS_SECRET_ACCESS_KEY diff --git a/infrastructure/backup/image/resources/install.sh b/infrastructure/backup/image/resources/install.sh index 1a8cbd7..b366fbf 100755 --- a/infrastructure/backup/image/resources/install.sh +++ b/infrastructure/backup/image/resources/install.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -eux pipefail + apt-get update > /dev/null; install -m 0700 /tmp/entrypoint.sh / diff --git a/infrastructure/backup/image/resources/restic-snapshots.sh b/infrastructure/backup/image/resources/restic-snapshots.sh index 1d97a2c..0190e5b 100755 --- a/infrastructure/backup/image/resources/restic-snapshots.sh +++ b/infrastructure/backup/image/resources/restic-snapshots.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -o pipefail +set -eux pipefail function main() { file_env AWS_ACCESS_KEY_ID diff --git a/infrastructure/backup/image/resources/restore.sh b/infrastructure/backup/image/resources/restore.sh index 92c16ca..d40772c 100755 --- a/infrastructure/backup/image/resources/restore.sh +++ b/infrastructure/backup/image/resources/restore.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -Eeo pipefail +set -eux pipefail function main() {