Support PKI enrollment

This commit is contained in:
Martin Lablans 2022-10-17 09:45:46 +02:00
parent ca45a3dbe9
commit 36d5206259
1 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,13 @@ case "$ACTION" in
uninstall) uninstall)
exec ./lib/remove-bridgehead-units.sh $PROJECT 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) preRun | preUpdate)
fixPermissions fixPermissions
;; ;;