bundles/letsencrypt: also check for chain.pem, nginx needs this
bundlewrap/pipeline/head This commit looks good Details

This commit is contained in:
Franzi 2021-02-20 17:38:11 +01:00
parent e2d7d05783
commit 5433859a86
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
1 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,7 @@ just_check=$2
cert_path="/var/lib/dehydrated/certs/$domain"
already_exists=false
if [ -f "$cert_path/privkey.pem" -a -f "$cert_path/fullchain.pem" ]
if [ -f "$cert_path/privkey.pem" -a -f "$cert_path/fullchain.pem" -a -f "$cert_path/chain.pem" ]
then
already_exists=true
fi
@ -23,6 +23,7 @@ fi
if [ "$already_exists" != true ]
then
rm -r "$cert_path"
mkdir -p "$cert_path"
openssl req -x509 -newkey rsa:4096 -nodes -days 3650 -subj "/CN=$domain" -keyout "$cert_path/privkey.pem" -out "$cert_path/fullchain.pem"
chmod 0600 "$cert_path/privkey.pem"