Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for correct certbot image (amd64/arm32/arm64) #132

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
15 changes: 15 additions & 0 deletions init-letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ data_path="./data/certbot"
email="" # Adding a valid address is strongly recommended
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits

# check correct architecture
if [ -f docker-compose.yml ]; then
arch="$(uname -m)"
if [[ "$arch" == "x86_64" ]]; then
sed -i 's/image: certbot\/certbot.*$/image: certbot\/certbot:latest/g' docker-compose.yml
elif [[ $(echo -e "$arch" | grep -e "arm" -e "aarch") ]]; then
if [[ $(echo -e "$arch" | grep -e "armv8" -e "aarch64") ]]; then
sed -i 's/image: certbot\/certbot.*$/image: certbot\/certbot:arm64v8-latest/g' docker-compose.yml
else
sed -i 's/image: certbot\/certbot.*$/image: certbot\/certbot:arm32v6-latest/g' docker-compose.yml
fi
fi
fi


if [ -d "$data_path" ]; then
read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision
if [ "$decision" != "Y" ] && [ "$decision" != "y" ]; then
Expand Down