Created
March 17, 2019 21:20
-
-
Save NbtKmy/cd0b0c777e486782de97e03abbb42bf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
serverpath="/path/to/Cantaloupe-Ordner" | |
passA="[Passwort A]" | |
passB="[Passwort B]" | |
pempath="/etc/letsencrypt/live/[Domain-Name]" | |
pkcsname="fullchain_and_key.p12" | |
keyalias="[Aliasname]" | |
jksname="MyKeyStore.jks" | |
cd $pempath | |
if [ -f $pkcsname ]; then | |
rm $pkcsname | |
fi | |
if [ -f $jksname ]; then | |
rm $jksname | |
fi | |
openssl pkcs12 -export -passout pass:$passA -in $pempath/fullchain.pem -inkey $pempath/privkey.pem -out $pkcsname -name $keyalias | |
keytool -importkeystore -deststorepass $passA -destkeypass $passB -destkeystore $jksname -srckeystore $pkcsname -srcstoretype PKCS12 -srcstorepass $passA -alias $keyalias | |
chmod 660 $pkcsname | |
chmod 660 $jksname | |
#Falls man jks-keystore-File in den Cantaloupe-Ordner bewegen möchte, soll man das #-Zeichen der nächsten Zeile löschen. | |
#mv -f $jksname $serverpath | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment