Files
dokku/plugins/nginx-vhosts/post-app-clone-setup
2020-02-17 19:08:39 -05:00

17 lines
492 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_DIR="$DOKKU_ROOT/$NEW_APP"
fn-plugin-property-clone "nginx" "$OLD_APP" "$NEW_APP"
rm -rf "$APP_DIR/nginx.conf"
}
trigger-nginx-vhosts-post-app-clone-setup "$@"