[mod] added PRODUCTION check for certbot
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
production.env
|
||||
@@ -138,16 +138,22 @@ 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" \
|
||||
# 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"
|
||||
|
||||
@@ -35,6 +35,7 @@ services:
|
||||
GROUP_UID: ${UID_PROXY:-12002}
|
||||
env_file:
|
||||
- ./certbot/files/domains.env
|
||||
- ./production.env # set PRODUCTION= here
|
||||
restart: always
|
||||
image: certbot
|
||||
container_name: certbot
|
||||
|
||||
Reference in New Issue
Block a user