Guest User

Untitled

a guest
Jul 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #!/bin/bash
  2. certdir=/etc/ssl/private
  3. keystore_path=/etc/letsencrypt/archive/example.com/keystore1.jks
  4. letsdir=/etc/letsencrypt/archive/example.com
  5. password=yourpasswordhere
  6.  
  7. for i in {6..1}; do cp $letsdir/keystore$i.jks $letsdir/keystore$((i+1)).jks; done
  8.  
  9. keytool -delete -alias root -storepass $password -keystore $keystore_path
  10. keytool -delete -alias 1 -storepass $password -keystore $keystore_path
  11.  
  12. keytool -importkeystore -srcstorepass $password -deststorepass $password -destkeypass $password -srckeystore $certdir/cert.p12 -srcstoretype PKCS12 -alias 1 -keystore $keystore_path
  13.  
  14. keytool -import -trustcacerts -alias root -deststorepass $password -file $certdir/chain.pem -noprompt -keystore $keystore_path
Add Comment
Please, Sign In to add comment