From 36d5206259f3da84f3f3f501b8f5951afb220726 Mon Sep 17 00:00:00 2001 From: Martin Lablans Date: Mon, 17 Oct 2022 09:45:46 +0200 Subject: [PATCH] Support PKI enrollment --- bridgehead | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bridgehead b/bridgehead index 5c7d121..8ab12bd 100755 --- a/bridgehead +++ b/bridgehead @@ -77,6 +77,13 @@ case "$ACTION" in uninstall) exec ./lib/remove-bridgehead-units.sh $PROJECT ;; + enroll) + if [ -e /etc/pki/${SITE_ID}.pem ]; then + echo "Private key already exists at /etc/pki/${SITE_ID}.pem. Please delete first to proceed." + exit 1 + fi + docker run --rm -ti -v /etc/bridgehead/pki:/pki samply/beam-enroll:latest --admin-email $OPERATOR_EMAIL --output- +path /pki --proxy-id $PROXY_ID preRun | preUpdate) fixPermissions ;;