diff --git a/bin/entrypoint-gohttpserver.sh b/bin/entrypoint-gohttpserver.sh index 93d357f..a68dc8c 100644 --- a/bin/entrypoint-gohttpserver.sh +++ b/bin/entrypoint-gohttpserver.sh @@ -13,16 +13,15 @@ # @Other : # @Resource : # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - APPNAME="$(basename "$0")" VERSION="202202020147-git" USER="${SUDO_USER:-${USER}}" HOME="${USER_HOME:-${HOME}}" SRC_DIR="${BASH_SOURCE%/*}" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set bash options -if [[ "$1" == "--debug" ]]; then shift 1 && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on"; fi -trap 'exitCode=${exitCode:-$?};[ -n "$DOCKER_ENTRYPOINT_TEMP_FILE" ] && [ -f "$DOCKER_ENTRYPOINT_TEMP_FILE" ] && rm -Rf "$DOCKER_ENTRYPOINT_TEMP_FILE" &>/dev/null' EXIT - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HOSTADMIN="${HOSTADMIN:-admin@localhost}" SSL="${SSL:-}"