diff --git a/bin/cherokee-server b/bin/cherokee-server index a874cc5..315ef54 100755 --- a/bin/cherokee-server +++ b/bin/cherokee-server @@ -1,5 +1,8 @@ #!/usr/bin/env sh -set -x +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - export PATH="/usr/local/share/cherokee/bin:$PATH" [ -f "/config/ssl.env" ] && . "/config/ssl.env" diff --git a/bin/entrypoint-cherokee.sh b/bin/entrypoint-cherokee.sh index 022e4ad..a94f66a 100755 --- a/bin/entrypoint-cherokee.sh +++ b/bin/entrypoint-cherokee.sh @@ -18,6 +18,10 @@ # @@sudo/root : no # @@Template : other/docker-entrypoint # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ -n "$DEBUG" ] && set -x +set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - APPNAME="$(basename "$0" 2>/dev/null)" VERSION="202210102226-git" HOME="${USER_HOME:-$HOME}" @@ -25,11 +29,6 @@ USER="${SUDO_USER:-$USER}" RUN_USER="${SUDO_USER:-$USER}" SCRIPT_SRC_DIR="${BASH_SOURCE%/*}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set bash options -[ "$1" == "--debug" ] && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on" -[ "$1" == "--raw" ] && export SHOW_RAW="true" -set -o pipefail -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set functions __version() { echo -e ${GREEN:-}"$VERSION"${NC:-}; } __find() { ls -A "$*" 2>/dev/null; }