feat: add support for clearing all nginx proxy entries in a single go
This commit is contained in:
1 parent
9bde10cdef
commit
c75149fb9f
1 file changed
+20
-3
@@ -4,9 +4,8 @@ set -eo pipefail
|
|||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
|
||||||
|
|
||||||
trigger-nginx-vhosts-proxy-clear-config() {
|
fn-trigger-nginx-vhosts-proxy-clear-config-app() {
|
||||||
declare desc="clear nginx config for proxy app containers from command line"
|
declare desc="clears the proxy config for a single app"
|
||||||
declare trigger="proxy-clear-config"
|
|
||||||
declare APP="$1"
|
declare APP="$1"
|
||||||
|
|
||||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||||
@@ -16,4 +15,22 @@ trigger-nginx-vhosts-proxy-clear-config() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trigger-nginx-vhosts-proxy-clear-config() {
|
||||||
|
declare desc="clear nginx config for proxy app containers from command line"
|
||||||
|
declare trigger="proxy-clear-config"
|
||||||
|
declare APP="$1"
|
||||||
|
|
||||||
|
if [[ "$APP" == "--all" ]]; then
|
||||||
|
exit_code="0"
|
||||||
|
for app in $(dokku_apps); do
|
||||||
|
if ! fn-trigger-nginx-vhosts-proxy-clear-config-app "$app"; then
|
||||||
|
exit_code="$?"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return "$exit_code"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fn-trigger-nginx-vhosts-proxy-clear-config-app "$APP"
|
||||||
|
}
|
||||||
|
|
||||||
trigger-nginx-vhosts-proxy-clear-config "$@"
|
trigger-nginx-vhosts-proxy-clear-config "$@"
|
||||||
Reference in new issue
Block a user