Skip to content
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