[mod] added PRODUCTION check for certbot
This commit is contained in:
@@ -138,17 +138,23 @@ function get_cert()
|
||||
|
||||
if [ $webserver_exists -eq 1 ] ; then
|
||||
log get_cert "Getting cert for [$root_domain] with [$domains]"
|
||||
# certbotx certonly \
|
||||
# --config-dir "$cert_bot_path" \
|
||||
# --agree-tos \
|
||||
# --domains "$domains" \
|
||||
# --email "contact@${root_domain}" \
|
||||
# --no-eff-email \
|
||||
# --expand \
|
||||
# --noninteractive \
|
||||
# --webroot \
|
||||
# --webroot-path "$web_root_path" \
|
||||
# $OPTIONS || true
|
||||
# PRODUCTION needs to be set in env
|
||||
if [ -z ${PRODUCTION+x} ]; then
|
||||
log WARNING get_cert "PRODUCTION not set, exiting"
|
||||
return 0
|
||||
fi
|
||||
log get_cert "Running certbot"
|
||||
certbot certonly \
|
||||
--config-dir "$cert_bot_path" \
|
||||
--agree-tos \
|
||||
--domains "$domains" \
|
||||
--email "contact@${root_domain}" \
|
||||
--no-eff-email \
|
||||
--expand \
|
||||
--noninteractive \
|
||||
--webroot \
|
||||
--webroot-path "$web_root_path"
|
||||
# $OPTIONS || true
|
||||
else
|
||||
log get_cert ERROR "Webserver for [$root_domain] not reachable after $server_retries retries"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user