Added fixes

devel
Alexey Berezhok 12 months ago
parent 3e1db6e3f5
commit c1e7097201

@ -1,6 +1,8 @@
#!/bin/bash
# info: update system firewall rules
# options: NONE
# options: NEED_IPT_SWITCH
# if first parameter set and it's value is iptables
# for rpm system, then need to activate iptables
#
# example: v-update-firewall
#
@ -9,6 +11,7 @@
#----------------------------------------------------------#
# Variables & Functions #
#----------------------------------------------------------#
need_ipt_switch="$1"
# Defining absolute path for iptables and modprobe
iptables="/sbin/iptables"
@ -36,6 +39,15 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
# Action #
#----------------------------------------------------------#
if [ -f /etc/redhat-release ] && [ "$need_ipt_switch" = "iptables" ]; then
# Revert from nftables to iptables only first time
systemctl stop firewalld
systemctl disable firewalld
dnf erase nftables -y
dnf install iptables-legacy iptables-legacy-libs iptables-services iptables-utils ipset -y
systemctl enable iptables --now
fi
# Self heal iptables links
heal_iptables_links

@ -26,6 +26,12 @@ nodejs_ver="20"
# Perform verification if read-only mode is enabled
check_hestia_demo_mode
#TODO
#Temporary disable for RPM
if [ -f /etc/redhat-release ]; then
exit 0
fi
# Detect and install NodeJS if necessary
if [ -z $(which "node") ]; then
read -p "NodeJS not found. Install now to proceed? [Y/n] " answer

@ -1873,7 +1873,7 @@ local_ip="$primary_ipv4"
# Configuring firewall
if [ "$iptables" = 'yes' ]; then
$HESTIA/bin/v-update-firewall
$HESTIA/bin/v-update-firewall iptables
fi
# Get public IP
@ -1922,7 +1922,7 @@ check_result $? "can't create $servername domain"
export SCHEDULED_RESTART="yes"
command="sudo $HESTIA/bin/v-update-sys-queue restart"
$HESTIA/bin/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
systemctl restart cron
systemctl restart crond
command="sudo $HESTIA/bin/v-update-sys-queue daily"
$HESTIA/bin/v-add-cron-job 'admin' '10' '00' '*' '*' '*' "$command"

Loading…
Cancel
Save