Files
dokku/plugins/nginx-vhosts/post-delete
Jose Diaz-Gonzalez 39beb8894f fix: cleanup app data
2022-11-24 00:51:21 -05:00

18 lines
497 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"
restart_nginx "$@" >/dev/null
rm -rf "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP"
}
trigger-nginx-vhosts-post-delete "$@"