Files
dokku/plugins/nginx-vhosts/post-app-clone-setup
2021-02-25 06:04:37 -05:00

17 lines
494 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
trigger-nginx-vhosts-post-app-clone-setup() {
declare desc="removes nginx 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 "nginx" "$OLD_APP" "$NEW_APP"
rm -rf "$APP_ROOT/nginx.conf"
}
trigger-nginx-vhosts-post-app-clone-setup "$@"