mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
The purpose of the reload is to remove nginx from being loaded. If nginx isn't running, then by definition the config is not loaded. Closes #6832
20 lines
548 B
Bash
Executable File
20 lines
548 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
|
|
|
trigger-nginx-vhosts-post-delete() {
|
|
declare desc="nginx-vhosts post-delete trigger"
|
|
declare trigger="post-delete"
|
|
declare APP="$1"
|
|
|
|
fn-plugin-property-destroy "nginx" "$APP"
|
|
if fn-nginx-vhosts-nginx-is-running; then
|
|
restart_nginx "$@" >/dev/null
|
|
fi
|
|
rm -rf "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP"
|
|
}
|
|
|
|
trigger-nginx-vhosts-post-delete "$@"
|