Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Fix letsencrypt certbot script #636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extra/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ function letsencrypt_cert() {
cat <<- EOF > /root/tmp/certbot.sh
#!/bin/bash
if [[ ! ( -d /etc/letsencrypt && "\$(ls -A /etc/letsencrypt)" ) ]]; then
/usr/bin/certbot-auto certonly -n --agree-tos --standalone --standalone-supported-challenges tls-sni-01 -m "$__myemail" -d "$__mydomain"
sudo /usr/bin/certbot-auto certonly -n --agree-tos --standalone --preferred-challenges http -m "$__myemail" -d "$__mydomain"
fi
sudo ln -sf "/etc/letsencrypt/live/$__mydomain/fullchain.pem" "$1"
sudo ln -sf "/etc/letsencrypt/live/$__mydomain/privkey.pem" "$2"
EOF
sudo chmod +x /root/tmp/certbot.sh
else
/usr/bin/certbot-auto certonly -n --agree-tos --standalone --standalone-supported-challenges tls-sni-01 -m "$__myemail" -d "$__mydomain"
sudo /usr/bin/certbot-auto certonly -n --agree-tos --standalone --preferred-challenges http -m "$__myemail" -d "$__mydomain"
sudo ln -s "/etc/letsencrypt/live/$__mydomain/fullchain.pem" "$1" || true
sudo ln -s "/etc/letsencrypt/live/$__mydomain/privkey.pem" "$2" || true
fi
Expand Down