1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00

fix(installer): nginx is enabled and restarted after its config is written

restart_nginx only logged "systemctl enable/restart nginx.service": both
calls had been commented out since the installer was added (2020). On
RHEL and openSUSE nginx is not enabled after its install, so the panel
was not served until someone started it; on Debian and Ubuntu nginx
kept the default site until a reload. The installer now checks the
config, enables nginx and restarts it, and stops if that fails.
This commit is contained in:
catborise 2026-11-06 10:54:04 +03:00
parent 3ceca5f9f3
commit c126a8cd66

View file

@ -355,10 +355,8 @@ set_hosts () {
restart_nginx () {
echo "* Setting Nginx to start on boot and starting Nginx."
log "systemctl enable nginx.service"
#systemctl enable nginx.service
log "systemctl restart nginx.service"
#systemctl restart nginx.service
# nginx is not enabled on RHEL and openSUSE, and Debian's runs the default site until a reload
nginx -t && systemctl enable nginx.service && systemctl restart nginx.service || exit 1
}