fix(nginxproxymanager): reset PWD before certbot update to avoid deleted cwd

After building OpenResty, the script does cd /opt/openresty followed by
rm -rf /opt/openresty, leaving $PWD pointing to a deleted directory.
When pip runs in the certbot block, the subprocess inherits the invalid
PWD and fails with OSError: No such file or directory.

Add cd /root before the certbot block to reset to a valid directory.

Closes #13240
This commit is contained in:
MickLesk
2026-03-23 21:53:35 +01:00
parent b1604ceae0
commit 15b5542ad6

View File

@@ -102,6 +102,7 @@ EOF
msg_ok "Built OpenResty" msg_ok "Built OpenResty"
fi fi
cd /root
if [ -d /opt/certbot ]; then if [ -d /opt/certbot ]; then
msg_info "Updating Certbot" msg_info "Updating Certbot"
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel $STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel