kunsi-pleroma-cybert-media #32

Merged
kunsi merged 16 commits from kunsi-pleroma-cybert-media into main 2021-02-20 21:07:14 +00:00
Showing only changes of commit 5433859a86 - Show all commits

View file

@ -6,7 +6,7 @@ just_check=$2
cert_path="/var/lib/dehydrated/certs/$domain" cert_path="/var/lib/dehydrated/certs/$domain"
already_exists=false 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 then
already_exists=true already_exists=true
fi fi
@ -23,6 +23,7 @@ fi
if [ "$already_exists" != true ] if [ "$already_exists" != true ]
then then
rm -r "$cert_path"
mkdir -p "$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" 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" chmod 0600 "$cert_path/privkey.pem"