File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ protocol=$(echo $protocol|tr '[:lower:]' '[:upper:]')
2020# Defining absolute path to iptables
2121iptables=" /sbin/iptables"
2222
23- # Get hestia port by reading nginx.conf
24- hestiaport=$( grep ' listen' $HESTIA /nginx/conf/nginx.conf | awk ' {print $2}' | sed " s|;||" )
25- if [ -z " $hestiaport " ]; then
26- hestiaport=8083
27- fi
28-
2923# Includes
3024# shellcheck source=/etc/hestiacp/hestia.conf
3125source /etc/hestiacp/hestia.conf
@@ -36,6 +30,12 @@ source $HESTIA/func/firewall.sh
3630# load config file
3731source_conf " $HESTIA /conf/hestia.conf"
3832
33+ # Get hestia port by reading nginx.conf
34+ hestiaport=$( grep ' listen' $HESTIA /nginx/conf/nginx.conf | awk ' {print $2}' | sed " s|;||" )
35+ if [ -z " $hestiaport " ]; then
36+ hestiaport=8083
37+ fi
38+
3939# ----------------------------------------------------------#
4040# Verifications #
4141# ----------------------------------------------------------#
Original file line number Diff line number Diff line change 7272 sed -i " /hestia_port/c\hestia_port = $PORT " /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
7373 fi
7474 sed -i " /COMMENT='HESTIA'/c\RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='$PORT ' IP='0.0.0.0/0' COMMENT='HESTIA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'" $HESTIA /data/firewall/rules.conf
75-
76- # Update F2B chains config
77- if [ -f " $HESTIA /data/firewall/chains.conf" ]; then
78- sed -i " s/PORT='$ORIGINAL_PORT '/PORT='$PORT '/g" $HESTIA /data/firewall/chains.conf
79- fi
80-
75+ sed -i " /CHAIN='HESTIA'/c\CHAIN='HESTIA' PORT='$PORT ' PROTOCOL='TCP'" $HESTIA /data/firewall/chains.conf
76+
8177 # Restart services
8278 if [ -n " $FIREWALL_SYSTEM " ] && [ " $FIREWALL_SYSTEM " != no ]; then
8379 $HESTIA /bin/v-restart-service iptables
You can’t perform that action at this time.
0 commit comments