Skip to content

Commit

Permalink
Force cert renewal when no .companion flag file
Browse files Browse the repository at this point in the history
  • Loading branch information
pini-gh committed Jun 27, 2020
1 parent ec330d6 commit 5811c90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/letsencrypt_service
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ function update_certs {
params_d+=( "--domain" "$domain" )
done

# Force renewal when .companion flag file doesn't exist, so that
# everything is set correctly into the nginx-proxy cert volume
# even if a certificate already exists into /etc/acme.sh/$config_name
if [[ ! -e "${certificate_dir}/.companion" ]]; then
params_d+=( "--force" )
fi

echo "Creating/renewal $base_domain certificates... (${hosts_array_expanded[*]})"
acme.sh --issue \
--log /dev/null \
Expand Down

0 comments on commit 5811c90

Please sign in to comment.