Split out import process for root certs

master
Brie Bruns 2021-10-10 21:43:15 -06:00
parent 3f25ad6b21
commit eba5fee91a
1 changed files with 8 additions and 4 deletions

View File

@ -204,6 +204,14 @@ _EOF
echo "Stopping Unifi controller..."
service unifi stop
echo "Removing existing certificates from Unifi protected keystore..."
keytool -delete -alias unifi -keystore "${KEYSTORE}" \
-deststorepass aircontrolenterprise -noprompt
keytool -delete -alias root -keystore "${KEYSTORE}" \
-deststorepass aircontrolenterprise -noprompt
keytool -delete -alias intermediate1 -keystore "${KEYSTORE}" \
-deststorepass aircontrolenterprise -noprompt
echo "Importing root LE CA cert and intermediaries..."
keytool -import -trustcacerts -alias root -file "${CATEMPFILE}" \
-storepass aircontrolenterprise -keystore "${KEYSTORE}" -noprompt
@ -212,10 +220,6 @@ _EOF
-storepass aircontrolenterprise -keystore "${KEYSTORE}" -noprompt
#echo "Removing existing certificate from Unifi protected keystore..."
#keytool -delete -alias unifi -keystore /usr/lib/unifi/data/keystore \
# -deststorepass aircontrolenterprise
echo "Importing certificate into Unifi keystore..."
keytool -importkeystore \
-deststorepass aircontrolenterprise \