diff --git a/dokku b/dokku index 755e652e6..4ab49bd22 100755 --- a/dokku +++ b/dokku @@ -55,7 +55,7 @@ export DOKKU_SYSTEM_USER=${DOKKU_SYSTEM_USER:="dokku"} export DOKKU_API_VERSION=1 export DOKKU_NOT_IMPLEMENTED_EXIT=10 export DOKKU_VALID_EXIT=0 -export DOKKU_PID="$BASHPID" +export DOKKU_PID="${DOKKU_PID:=$$}" export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"} export DOKKU_LOGS_HOST_DIR=${DOKKU_LOGS_HOST_DIR:=$DOKKU_LOGS_DIR} @@ -88,7 +88,7 @@ fi ! has_tty && DOKKU_QUIET_OUTPUT=1 if [[ $(id -un) != "dokku" ]]; then - unset TMP TMPDIR TEMP TEMPDIR + unset DOKKU_PID TMP TMPDIR TEMP TEMPDIR if [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]] && [[ $1 != "scheduler-k3s:initialize" ]] && [[ $1 != "scheduler-k3s:uninstall" ]]; then export SSH_USER=$(id -un) sudo -u dokku -E -H "$0" "$@" diff --git a/plugins/common/functions b/plugins/common/functions index b47c74a81..358f8af23 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -983,6 +983,7 @@ acquire_advisory_lock() { dokku_log_fail "Run 'apps:unlock' to release the existing deploy lock" fi fi + echo "$DOKKU_PID" >"$LOCK_FILE" } release_advisory_lock() { diff --git a/plugins/nginx-vhosts/nginx-property b/plugins/nginx-vhosts/nginx-property new file mode 100755 index 000000000..cd48b3c42 Binary files /dev/null and b/plugins/nginx-vhosts/nginx-property differ