mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
This change ensures users don't have unnecessary proxies starting on their servers and potentially have apps not routing correctly due to another proxy squatting on a port. Closes #5846
21 lines
552 B
Bash
Executable File
21 lines
552 B
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/command-functions"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-nginx-pre-restore() {
|
|
declare desc="pre-restore the nginx proxy"
|
|
declare trigger="install"
|
|
|
|
if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" != "started" ]]; then
|
|
return
|
|
fi
|
|
|
|
if ! cmd-nginx-start; then
|
|
dokku_log_warn "Failed to restore nginx proxy, requests may not route as expected"
|
|
fi
|
|
}
|
|
|
|
trigger-nginx-pre-restore "$@"
|