Added install fixes

This commit is contained in:
Alexey Berezhok
2026-04-12 00:50:31 +03:00
parent 4cb55905cc
commit 4b023ea671
3 changed files with 13 additions and 2 deletions

View File

@@ -46,8 +46,12 @@ fi
for service in $service_list; do for service in $service_list; do
if [ "$service" = "iptables" ]; then if [ "$service" = "iptables" ]; then
$BIN/v-stop-firewall $BIN/v-stop-firewall
else
if [ "$service" = "nginx" ]; then
systemctl stop nginx-system
else else
systemctl stop "$service" systemctl stop "$service"
fi
result=$? result=$?
if [ "$result" -ne 0 ]; then if [ "$result" -ne 0 ]; then
$BIN/v-log-action "system" "Error" "System" "Service failed to stop (Name: $service)." $BIN/v-log-action "system" "Error" "System" "Service failed to stop (Name: $service)."

View File

@@ -559,6 +559,9 @@ clear
install_welcome_message install_welcome_message
# Web stack # Web stack
if [ "$bunkerweb" = 'yes' ]; then
echo ' - Bunkerweb protection'
fi
echo ' - NGINX Web / Proxy Server' echo ' - NGINX Web / Proxy Server'
if [ "$apache" = 'yes' ]; then if [ "$apache" = 'yes' ]; then
echo ' - Apache Web Server (as backend)' echo ' - Apache Web Server (as backend)'
@@ -1412,6 +1415,10 @@ mkdir -p /usr/local/hestia/nginx-system/etc/nginx/modules-enabled
mkdir -p /var/log/nginx/domains mkdir -p /var/log/nginx/domains
mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/main mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/main
PROXY_PORT=$(grep '^PROXY_PORT=' "$HESTIA/conf/hestia.conf" | cut -d'=' -f2 | tr -d "'" || echo 80)
NGINX_CONF="/usr/local/hestia/nginx-system/etc/nginx/conf.d/default.conf"
sed -i "s/^\(\s*listen\s*\)['\"]*[0-9]\+['\"]*;/\1${PROXY_PORT};/" "$NGINX_CONF"
# Update dns servers in nginx.conf # Update dns servers in nginx.conf
for nameserver in $(grep -is '^nameserver' /etc/resolv.conf | cut -d' ' -f2 | tr '\r\n' ' ' | xargs); do for nameserver in $(grep -is '^nameserver' /etc/resolv.conf | cut -d' ' -f2 | tr '\r\n' ' ' | xargs); do
if [[ "$nameserver" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then if [[ "$nameserver" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then