forked from finallycoffee/base
fix: capture exit code instead of std-out
This commit is contained in:
parent
e93bb182c0
commit
9e76d11aa4
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -xeuo pipefail
|
||||||
|
|
||||||
LEGO_BINARY=$(/usr/bin/env which lego)
|
LEGO_BINARY=$(/usr/bin/env which lego)
|
||||||
|
|
||||||
@ -9,7 +9,8 @@ if [[ -n "${LEGO_HTTP_FALLBACK_PORT:-}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
nc_exit_code=$(nc -z 127.0.0.1 $LEGO_HTTP_PORT);
|
nc -z 127.0.0.1 $LEGO_HTTP_PORT;
|
||||||
|
nc_exit_code=$?;
|
||||||
set -e
|
set -e
|
||||||
if [[ $nc_exit_code -eq 0 ]]; then
|
if [[ $nc_exit_code -eq 0 ]]; then
|
||||||
LEGO_HTTP_PORT=$LEGO_HTTP_FALLBACK_PORT
|
LEGO_HTTP_PORT=$LEGO_HTTP_FALLBACK_PORT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user