mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
fix: add missing triggers for openresty-vhosts plugin
This commit is contained in:
15
plugins/openresty-vhosts/post-app-clone-setup
Executable file
15
plugins/openresty-vhosts/post-app-clone-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-openresty-vhosts-post-app-clone-setup() {
|
||||
declare desc="removes openresty files when setting up a clone"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
local APP_ROOT="$DOKKU_ROOT/$NEW_APP"
|
||||
|
||||
fn-plugin-property-clone "openresty" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-openresty-vhosts-post-app-clone-setup "$@"
|
||||
17
plugins/openresty-vhosts/post-app-rename-setup
Executable file
17
plugins/openresty-vhosts/post-app-rename-setup
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/internal-functions"
|
||||
|
||||
trigger-openresty-vhosts-post-app-rename-setup() {
|
||||
declare desc="calls proxy-clear-config"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "openresty" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "openresty" "$OLD_APP"
|
||||
plugn trigger proxy-clear-config "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-openresty-vhosts-post-app-rename-setup "$@"
|
||||
16
plugins/openresty-vhosts/post-delete
Executable file
16
plugins/openresty-vhosts/post-delete
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/functions"
|
||||
|
||||
trigger-openresty-vhosts-post-delete() {
|
||||
declare desc="openresty-vhosts post-delete trigger"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "openresty" "$APP"
|
||||
rm -rf "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP"
|
||||
}
|
||||
|
||||
trigger-openresty-vhosts-post-delete "$@"
|
||||
Reference in New Issue
Block a user