diff --git a/reconfigure.sh b/reconfigure.sh index e00f6d8..ec42a4f 100755 --- a/reconfigure.sh +++ b/reconfigure.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -exo pipefail if [ ! -f .env ]; then echo "Please create a .env file" diff --git a/start.d/internal_dns.sh b/start.d/internal_dns.sh index aa40667..c51d632 100644 --- a/start.d/internal_dns.sh +++ b/start.d/internal_dns.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -ex +set -exo pipefail dns_container_id="$(docker ps | grep "$OVPN_DNS_CONTAINER_NAME_PATTERN" | awk '{ print $1 }' 2> /dev/null)" if [ "$dns_container_id" != "" ]; then diff --git a/start.sh b/start.sh index 1798a25..14a5083 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -exo pipefail if [ ! -f .env ]; then echo "Please create a .env file" @@ -9,7 +10,7 @@ set -a source .env set +a -docker compose -p "$OVPN_COMPOSE_NAME" up -d --force-recreate --always-recreate-deps "$@" +docker-compose -p "$OVPN_COMPOSE_NAME" up -d --force-recreate --always-recreate-deps "$@" for script_file in ./start.d/*.sh do diff --git a/stop.d/internal_dns.sh b/stop.d/internal_dns.sh index 5dce0e7..937ad1b 100644 --- a/stop.d/internal_dns.sh +++ b/stop.d/internal_dns.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -ex +set -exo pipefail dns_container_id="$(docker ps | grep "$OVPN_DNS_CONTAINER_NAME_PATTERN" | awk '{ print $1 }' 2> /dev/null)" if [ "$dns_container_id" != "" ]; then diff --git a/stop.sh b/stop.sh index 3921a37..8574a35 100755 --- a/stop.sh +++ b/stop.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -exo pipefail if [ ! -f .env ]; then echo "Please create a .env file" @@ -9,7 +10,7 @@ set -a source .env set +a -docker compose -p "$OVPN_COMPOSE_NAME" down "$@" +docker-compose -p "$OVPN_COMPOSE_NAME" down "$@" for script_file in ./start.d/*.sh do