Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if test $(${FIND} /etc/letsencrypt/live/unifi.example.com/cert.pem -mmin -60)
- then
- ${SYSTEMCTL} stop unifi.service
- ${OPENSSL} \
- pkcs12 \
- -export \
- -inkey /etc/letsencrypt/live/unifi.example.com/privkey.pem \
- -in /etc/letsencrypt/live/unifi.example.com/fullchain.pem \
- -out /tmp/unifi.example.com.p12 \
- -name ubnt \
- -password pass:temppass
- ${KEYTOOL} \
- -importkeystore \
- -deststorepass aircontrolenterprise \
- -destkeypass aircontrolenterprise \
- -destkeystore /opt/UniFi/data/keystore \
- -srckeystore /tmp/unifi.example.com.p12 \
- -srcstoretype PKCS12 \
- -srcstorepass temppass \
- -alias ubnt \
- -noprompt
- ${RM} -f /tmp/unifi.example.com.p12
- ${SYSTEMCTL} start unifi.service
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement