no more syslink. Save certificate as .pem file

This commit is contained in:
hoellen 2018-04-10 13:37:52 +02:00
parent 12a8e86d2a
commit 82c5e43aa6

View File

@ -106,19 +106,15 @@ do
fi fi
# get certificate # get certificate
python "$acme_tiny" --account-key "$account_key" --csr "$csr" --acme-dir "$acme_dir" > "$arg/tmp.crt" python "$acme_tiny" --account-key "$account_key" --csr "$csr" --acme-dir "$acme_dir" > "$arg/tmp.pem"
if [ $? != 0 ]; then if [ $? != 0 ]; then
rm -rf $arg/tmp.crt rm -rf $arg/tmp.pem
echo "Getting certificate for \"$NAME\" FAILED!" echo "Getting certificate for \"$NAME\" FAILED!"
continue continue
fi fi
mv -f "$arg/tmp.crt" "$arg/$NAME.crt" mv -f "$arg/tmp.pem" "$arg/$NAME.pem"
if [ ! -f "$NAME.pem" ]; then
ln -s "$NAME.crt" "$arg/$NAME.pem"
fi
echo "Certificate for \"$NAME\" successfully created!" echo "Certificate for \"$NAME\" successfully created!"
counter=$((counter+1)) counter=$((counter+1))