Split out import process for root certs

master
Brie Bruns 12 months ago
parent 3f25ad6b21
commit eba5fee91a
  1. 12
      gen-unifi-cert.sh

@ -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 \

Loading…
Cancel
Save