Files
dokku/plugins/domains/domains-disable
Jose Diaz-Gonzalez 61a306664f refactor: move domain manipulation into triggers
This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
2020-05-06 00:16:51 -04:00

19 lines
436 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-domains-domains-disable() {
declare desc="disables domains for an app"
declare trigger="domains-disable"
declare APP="$1" RESTART_APP="$2"
if [[ "$RESTART_APP" == "true" ]]; then
disable_app_vhost "$APP"
else
disable_app_vhost "$APP" --no-restart
fi
}
trigger-domains-domains-disable "$@"