Added fixes
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: update system firewall rules
|
# 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
|
# example: v-update-firewall
|
||||||
#
|
#
|
||||||
@@ -9,6 +11,7 @@
|
|||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Variables & Functions #
|
# Variables & Functions #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
need_ipt_switch="$1"
|
||||||
|
|
||||||
# Defining absolute path for iptables and modprobe
|
# Defining absolute path for iptables and modprobe
|
||||||
iptables="/sbin/iptables"
|
iptables="/sbin/iptables"
|
||||||
@@ -36,6 +39,15 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
|
|||||||
# Action #
|
# 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
|
# Self heal iptables links
|
||||||
heal_iptables_links
|
heal_iptables_links
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ nodejs_ver="20"
|
|||||||
# Perform verification if read-only mode is enabled
|
# Perform verification if read-only mode is enabled
|
||||||
check_hestia_demo_mode
|
check_hestia_demo_mode
|
||||||
|
|
||||||
|
#TODO
|
||||||
|
#Temporary disable for RPM
|
||||||
|
if [ -f /etc/redhat-release ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Detect and install NodeJS if necessary
|
# Detect and install NodeJS if necessary
|
||||||
if [ -z $(which "node") ]; then
|
if [ -z $(which "node") ]; then
|
||||||
read -p "NodeJS not found. Install now to proceed? [Y/n] " answer
|
read -p "NodeJS not found. Install now to proceed? [Y/n] " answer
|
||||||
|
|||||||
@@ -1873,7 +1873,7 @@ local_ip="$primary_ipv4"
|
|||||||
|
|
||||||
# Configuring firewall
|
# Configuring firewall
|
||||||
if [ "$iptables" = 'yes' ]; then
|
if [ "$iptables" = 'yes' ]; then
|
||||||
$HESTIA/bin/v-update-firewall
|
$HESTIA/bin/v-update-firewall iptables
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get public IP
|
# Get public IP
|
||||||
@@ -1922,7 +1922,7 @@ check_result $? "can't create $servername domain"
|
|||||||
export SCHEDULED_RESTART="yes"
|
export SCHEDULED_RESTART="yes"
|
||||||
command="sudo $HESTIA/bin/v-update-sys-queue restart"
|
command="sudo $HESTIA/bin/v-update-sys-queue restart"
|
||||||
$HESTIA/bin/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
|
$HESTIA/bin/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
|
||||||
systemctl restart cron
|
systemctl restart crond
|
||||||
|
|
||||||
command="sudo $HESTIA/bin/v-update-sys-queue daily"
|
command="sudo $HESTIA/bin/v-update-sys-queue daily"
|
||||||
$HESTIA/bin/v-add-cron-job 'admin' '10' '00' '*' '*' '*' "$command"
|
$HESTIA/bin/v-add-cron-job 'admin' '10' '00' '*' '*' '*' "$command"
|
||||||
|
|||||||
Reference in New Issue
Block a user