mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-23 15:54:56 +02:00
termix - patch tmp nginx behaviour to match the install script (#15283)
* Update Nginx configuration and service files to deal with /tmp update issues Create necessary directories and configuration files for Nginx service. * Refactor pidfile.conf creation in termix.sh Reformatted the creation of pidfile.conf for consistency. * Clean up old nginx configuration files Remove old nginx configuration files before creating new ones. * Update ct/termix.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> * Update ct/termix.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> * Update ct/termix.sh only create if it doesn't exist * Update termix.sh * Fix heredoc syntax --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Co-authored-by: Sam Heinz <sam@samheinz.com>
This commit is contained in:
+17
-1
@@ -206,9 +206,25 @@ EOF
|
||||
sed -i 's|/app/html|/opt/termix/html|g' /etc/nginx/nginx.conf
|
||||
sed -i 's|/app/nginx|/opt/termix/nginx|g' /etc/nginx/nginx.conf
|
||||
sed -i 's|listen ${PORT};|listen 80;|g' /etc/nginx/nginx.conf
|
||||
|
||||
rm -f /etc/systemd/system/nginx.service.d/pidfile.conf
|
||||
rm -f /etc/tmpfiles.d/nginx-termix.conf
|
||||
|
||||
if [ ! -d /tmp/nginx ]; then
|
||||
mkdir -p /tmp/nginx
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/tmpfiles.d/nginx-termix.conf ]; then
|
||||
echo "d /tmp/nginx 0755 nobody nogroup -" >/etc/tmpfiles.d/nginx-termix.conf
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/systemd/system/nginx.service.d/pidfile.conf ]; then
|
||||
mkdir -p /etc/systemd/system/nginx.service.d/
|
||||
cat <<'EOF' >/etc/systemd/system/nginx.service.d/pidfile.conf
|
||||
[Service]
|
||||
PIDFile=/tmp/nginx/nginx.pid
|
||||
EOF
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
nginx -t && systemctl restart nginx
|
||||
msg_ok "Updated Nginx Configuration"
|
||||
|
||||
Reference in New Issue
Block a user