Implement domains:reset

This commit is contained in:
Álvaro Justen (@turicas) authored and Jose Diaz-Gonzalez committed 2025-07-01 20:11:48 -04:00
1 parent b97086a8bd
commit 67311264d7
6 files changed
+32 -3

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
cmd-domains-reset() {
declare desc="reset app domains to global-configured domains"
declare cmd="domains:reset"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
verify_app_name "$APP"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
rm -f "$APP_VHOST_PATH"
domains_setup "$APP"
plugn trigger post-domains-update "$APP" "reset"
dokku_log_info1 "Reset domains for $APP"
}
cmd-domains-reset "$@"