Skip to content

Commit

Permalink
Update install.sh to use Snapd version of Certbot
Browse files Browse the repository at this point in the history
  • Loading branch information
putsi authored and Jarmo Puttonen committed Nov 12, 2021
1 parent 22b81e3 commit 1226719
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ if [ 0 -eq $? ]; then
fi
fi;

apt update -y && apt install -y python3 python3-pip certbot && pip3 install dnslib
# Use snap version of Certbot because APT-version is too old.
snap install --classic certbot
snap refresh certbot
ln -s /snap/bin/certbot /usr/bin/certbot

apt update -y && apt install -y python3 python3-pip && pip3 install dnslib

mkdir -p /usr/local/collaborator/
cp "$SRC_PATH/dnshook.sh" /usr/local/collaborator/
cp "$SRC_PATH/cleanup.sh" /usr/local/collaborator/
Expand All @@ -91,7 +97,7 @@ read -p "Press enter to continue"
# The first step requests the actual wildcard with *.domain.com (all subdomains) certificate.
# The second step expands the certificate with domain.com (without any subdomain).
# This used to be possible in single-step, however currently it can lead to invalid TXT-record error,
# as certbot starts the dnshooks concurrently and not consecutively.
# certbot as starts the dnshooks concurrently and not consecutively.
certbot certonly --manual-auth-hook "/usr/local/collaborator/dnshook.sh $MYPRIVATEIP" -m $EMAIL --manual-cleanup-hook /usr/local/collaborator/cleanup.sh \
-d "*.$DOMAIN" \
--server https://acme-v02.api.letsencrypt.org/directory \
Expand Down

0 comments on commit 1226719

Please sign in to comment.