Skip to content

Commit 9a0383b

Browse files
committed
Move SKIP_CERTBOT_OWNERSHIP check around the entire certbot code
1 parent 63ae924 commit 9a0383b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ chown -R "$PUID:$PGID" /etc/nginx/conf.d
2626
# Certbot directories - optimized approach
2727
CERT_INIT_FLAG="/opt/certbot/.ownership_initialized"
2828

29-
if [ ! -f "$CERT_INIT_FLAG" ]; then
29+
if [ ! -f "$CERT_INIT_FLAG" ] || [ "$SKIP_CERTBOT_OWNERSHIP" != "true" ]; then
3030
# Prevents errors when installing python certbot plugins when non-root
31-
if [ "$SKIP_CERTBOT_OWNERSHIP" != "true" ]; then
32-
log_info 'Changing ownership of /opt/certbot directories ...'
33-
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
34-
fi
31+
log_info 'Changing ownership of /opt/certbot directories ...'
32+
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
3533

3634
# Handle all site-packages directories efficiently
3735
find /opt/certbot/lib -type d -name "site-packages" | while read -r SITE_PACKAGES_DIR; do

0 commit comments

Comments
 (0)