fix: implement missing cleanup routines

Without these, there was potential for configuration for certain plugins to continue to exist after an app was deleted.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-02 02:55:59 -05:00
parent 8c0dbc7d6a
commit 4aaefb0c4c
3 changed files with 8 additions and 1 deletions

View File

@@ -1,12 +1,15 @@
#!/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"
restart_nginx "$@" >/dev/null
}