mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-12 04:39:37 +00:00
Move SKIP_CERTBOT_OWNERSHIP check around the entire certbot code
This commit is contained in:
@ -26,12 +26,10 @@ chown -R "$PUID:$PGID" /etc/nginx/conf.d
|
|||||||
# Certbot directories - optimized approach
|
# Certbot directories - optimized approach
|
||||||
CERT_INIT_FLAG="/opt/certbot/.ownership_initialized"
|
CERT_INIT_FLAG="/opt/certbot/.ownership_initialized"
|
||||||
|
|
||||||
if [ ! -f "$CERT_INIT_FLAG" ]; then
|
if [ ! -f "$CERT_INIT_FLAG" ] || [ "$SKIP_CERTBOT_OWNERSHIP" != "true" ]; then
|
||||||
# Prevents errors when installing python certbot plugins when non-root
|
# Prevents errors when installing python certbot plugins when non-root
|
||||||
if [ "$SKIP_CERTBOT_OWNERSHIP" != "true" ]; then
|
log_info 'Changing ownership of /opt/certbot directories ...'
|
||||||
log_info 'Changing ownership of /opt/certbot directories ...'
|
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
||||||
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Handle all site-packages directories efficiently
|
# Handle all site-packages directories efficiently
|
||||||
find /opt/certbot/lib -type d -name "site-packages" | while read -r SITE_PACKAGES_DIR; do
|
find /opt/certbot/lib -type d -name "site-packages" | while read -r SITE_PACKAGES_DIR; do
|
||||||
|
Reference in New Issue
Block a user