Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
use httpd password file if one exists
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkmassive committed Sep 6, 2020
1 parent f4904f1 commit b682c6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion renew-le.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ rm -f "$WORKDIR"/*.pem
rm -f "$WORKDIR"/httpd-csr.*

# generate CSR
openssl req -new -sha256 -config "$WORKDIR/ipa-httpd.cnf" -key /var/lib/ipa/private/httpd.key -out "$WORKDIR/httpd-csr.der"
OPENSSL_PASSWD_FILE="/var/lib/ipa/passwds/$HOSTNAME-443-RSA"
[ -f "$OPENSSL_PASSWD_FILE" ] && OPENSSL_EXTRA_ARGS="-passin file:$OPENSSL_PASSWD_FILE" || unset OPENSSL_EXTRA_ARGS
openssl req -new -sha256 -config "$WORKDIR/ipa-httpd.cnf" -key /var/lib/ipa/private/httpd.key -out "$WORKDIR/httpd-csr.der" $OPENSSL_EXTRA_ARGS

# httpd process prevents letsencrypt from working, stop it
service httpd stop
Expand Down

0 comments on commit b682c6e

Please sign in to comment.