Ensure logrotate doesn't use non-existing npm user (#3026)

Upstream uses a dedicated user to run NPM. Ensure we do not try to user the missing user to rotate logs [which fails].
This commit is contained in:
Marco Cunha 2024-05-21 00:38:47 +01:00 committed by GitHub
parent bf08d0a435
commit 3af40c5238
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,6 +193,7 @@ customize
msg_info "Starting Services" msg_info "Starting Services"
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg
systemctl enable -q --now openresty systemctl enable -q --now openresty
systemctl enable -q --now npm systemctl enable -q --now npm