2022-11-22 23:11:04 -05:00
|
|
|
#!/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"
|
|
|
|
|
|
2023-07-01 06:57:57 -04:00
|
|
|
if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" != "started" ]]; then
|
2022-11-22 23:11:04 -05:00
|
|
|
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 "$@"
|