daily pastebin goal
0%
SHARE
TWEET

script to update ssl certificate in unifi

a guest Jan 17th, 2018 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if test $(${FIND} /etc/letsencrypt/live/unifi.example.com/cert.pem -mmin -60)
  2. then
  3.         ${SYSTEMCTL} stop unifi.service
  4.         ${OPENSSL} \
  5.           pkcs12 \
  6.           -export \
  7.           -inkey /etc/letsencrypt/live/unifi.example.com/privkey.pem \
  8.           -in /etc/letsencrypt/live/unifi.example.com/fullchain.pem \
  9.           -out /tmp/unifi.example.com.p12 \
  10.           -name ubnt \
  11.           -password pass:temppass
  12.         ${KEYTOOL} \
  13.           -importkeystore \
  14.           -deststorepass aircontrolenterprise \
  15.           -destkeypass aircontrolenterprise \
  16.           -destkeystore /opt/UniFi/data/keystore \
  17.           -srckeystore /tmp/unifi.example.com.p12 \
  18.           -srcstoretype PKCS12 \
  19.           -srcstorepass temppass \
  20.           -alias ubnt \
  21.           -noprompt
  22.         ${RM} -f /tmp/unifi.example.com.p12
  23.         ${SYSTEMCTL} start unifi.service
  24. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top