[fix] fixed certbot image permissions
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
web_root_path="/service/html"
|
||||
cert_root_path="/service/ssl"
|
||||
temp_path="/service/temp"
|
||||
cert_bot_path="/etc/letsencrypt"
|
||||
cert_bot_ssl="/service/letsencrypt/ssl"
|
||||
cert_bot_work="/service/letsencrypt/work"
|
||||
cert_bot_log="/service/letsencrypt/log"
|
||||
server_retries=10
|
||||
log_file="" # leave empty for stdout
|
||||
|
||||
@@ -100,12 +102,12 @@ function copy_cert()
|
||||
{
|
||||
local domain=$1
|
||||
local cert_path="$cert_root_path/$domain"
|
||||
if [[ -f "$cert_bot_path/live/$domain/privkey.pem" ]]; then
|
||||
cp "$cert_bot_path/live/$domain/privkey.pem" "$cert_path/privkey.pem"
|
||||
cp "$cert_bot_path/live/$domain/fullchain.pem" "$cert_path/fullchain.pem"
|
||||
if [[ -f "$cert_bot_ssl/live/$domain/privkey.pem" ]]; then
|
||||
cp "$cert_bot_ssl/live/$domain/privkey.pem" "$cert_path/privkey.pem"
|
||||
cp "$cert_bot_ssl/live/$domain/fullchain.pem" "$cert_path/fullchain.pem"
|
||||
return 0
|
||||
else
|
||||
log ERROR copy_cert "No key exists at "$cert_bot_path/live/$domain/privkey.pem" for [$domain]"
|
||||
log ERROR copy_cert "No key exists at "$cert_bot_ssl/live/$domain/privkey.pem" for [$domain]"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@@ -145,7 +147,9 @@ function get_cert()
|
||||
fi
|
||||
log get_cert "Running certbot"
|
||||
certbot certonly \
|
||||
--config-dir "$cert_bot_path" \
|
||||
--config-dir "$cert_bot_ssl" \
|
||||
--work-dir "$cert_bot_work" \
|
||||
--logs-dir "$cert_bot_log" \
|
||||
--agree-tos \
|
||||
--domains "$domains" \
|
||||
--email "contact@${root_domain}" \
|
||||
|
||||
Reference in New Issue
Block a user