mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
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.
17 lines
446 B
Bash
Executable File
17 lines
446 B
Bash
Executable File
#!/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-set() {
|
|
declare desc="installs an SSL cert/key pair onto an app"
|
|
declare trigger="certs-set"
|
|
declare APP="$1" CRT_FILE="$2" KEY_FILE="$3"
|
|
|
|
verify_app_name "$APP"
|
|
fn-certs-set "$APP" "$CRT_FILE" "$KEY_FILE"
|
|
}
|
|
|
|
trigger-certs-certs-set "$@"
|