Skip to content

Commit 1357774

Browse files
committed
Add SKIP_CERTBOT_OWNERSHIP env var support to skip certbot folder ownership
1 parent 5f54490 commit 1357774

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ CERT_INIT_FLAG="/opt/certbot/.ownership_initialized"
2828

2929
if [ ! -f "$CERT_INIT_FLAG" ]; then
3030
# Prevents errors when installing python certbot plugins when non-root
31-
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
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
3235

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

0 commit comments

Comments
 (0)