We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d85cdc commit 4baf5ebCopy full SHA for 4baf5eb
bin/v-add-firewall-chain
@@ -21,6 +21,12 @@ protocol=$(echo $protocol|tr '[:lower:]' '[:upper:]')
21
# Defining absolute path to iptables
22
iptables="/sbin/iptables"
23
24
+# Get vesta port by reading nginx.conf
25
+vestaport=$(grep 'listen' /usr/local/vesta/nginx/conf/nginx.conf | awk '{print $2}' | sed "s|;||")
26
+if [ -z "$vestaport" ]; then
27
+ vestaport=8083
28
+fi
29
+
30
# Includes
31
source $VESTA/func/main.sh
32
source $VESTA/conf/vesta.conf
@@ -47,7 +53,7 @@ case $chain in
47
53
DNS) port=53; protocol=UDP ;;
48
54
WEB) port='80,443'; protocol=TCP ;;
49
55
DB) port='3306,5432'; protocol=TCP ;;
50
- VESTA) port=8083; protocol=TCP ;;
56
+ VESTA) port=$vestaport; protocol=TCP ;;
51
57
*) check_args '2' "$#" 'CHAIN PORT' ;;
52
58
esac
59
0 commit comments