feat: expose certs-set and certs-remove plugin triggers

Adds `certs-set` and `certs-remove` plugin triggers so other plugins can install or remove an app's SSL cert/key pair without shelling out to the `dokku certs:add` / `dokku certs:remove` subcommands. Shared implementations live as `fn-certs-set` and `fn-certs-remove` in `plugins/certs/internal-functions`, with the subcommands and the new triggers calling `verify_app_name` before delegating.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-12 18:37:06 -04:00
parent 12c00b57fc
commit 460d92e21c
7 changed files with 154 additions and 21 deletions

16
plugins/certs/certs-remove Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-certs-certs-remove() {
declare desc="removes the SSL cert/key pair from an app"
declare trigger="certs-remove"
declare APP="$1"
verify_app_name "$APP"
fn-certs-remove "$APP"
}
trigger-certs-certs-remove "$@"