fix: keep track of the stopped/started state of haproxy
This commit is contained in:
20
plugins/haproxy-vhosts/pre-restore
Executable file
20
plugins/haproxy-vhosts/pre-restore
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/haproxy-vhosts/command-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-haproxy-pre-restore() {
|
||||
declare desc="pre-restore the caddy proxy"
|
||||
declare trigger="install"
|
||||
|
||||
if [[ "$(fn-plugin-property-get "haproxy" "--global" "proxy-status")" == "stopped" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if ! cmd-haproxy-start; then
|
||||
dokku_log_warn "Failed to restore haproxy proxy, requests may not route as expected"
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-haproxy-pre-restore "$@"
|
||||
Reference in New Issue
Block a user