|
@@ -21,15 +21,15 @@ protocol=$(echo $protocol|tr '[:lower:]' '[:upper:]')
|
|
|
# Defining absolute path to iptables
|
|
# Defining absolute path to iptables
|
|
|
iptables="/sbin/iptables"
|
|
iptables="/sbin/iptables"
|
|
|
|
|
|
|
|
-# Get vesta port by reading nginx.conf
|
|
|
|
|
-vestaport=$(grep 'listen' /usr/local/vesta/nginx/conf/nginx.conf | awk '{print $2}' | sed "s|;||")
|
|
|
|
|
-if [ -z "$vestaport" ]; then
|
|
|
|
|
- vestaport=8083
|
|
|
|
|
|
|
+# Get hestia port by reading nginx.conf
|
|
|
|
|
+hestiaport=$(grep 'listen' $HESTIA/nginx/conf/nginx.conf | awk '{print $2}' | sed "s|;||")
|
|
|
|
|
+if [ -z "$hestiaport" ]; then
|
|
|
|
|
+ hestiaport=8083
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Includes
|
|
# Includes
|
|
|
-source $VESTA/func/main.sh
|
|
|
|
|
-source $VESTA/conf/vesta.conf
|
|
|
|
|
|
|
+source $HESTIA/func/main.sh
|
|
|
|
|
+source $HESTIA/conf/hestia.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
@@ -53,7 +53,7 @@ case $chain in
|
|
|
DNS) port=53; protocol=UDP ;;
|
|
DNS) port=53; protocol=UDP ;;
|
|
|
WEB) port='80,443'; protocol=TCP ;;
|
|
WEB) port='80,443'; protocol=TCP ;;
|
|
|
DB) port='3306,5432'; protocol=TCP ;;
|
|
DB) port='3306,5432'; protocol=TCP ;;
|
|
|
- VESTA) port=$vestaport; protocol=TCP ;;
|
|
|
|
|
|
|
+ HESTIA) port=$hestiaport; protocol=TCP ;;
|
|
|
*) check_args '2' "$#" 'CHAIN PORT' ;;
|
|
*) check_args '2' "$#" 'CHAIN PORT' ;;
|
|
|
esac
|
|
esac
|
|
|
|
|
|
|
@@ -72,7 +72,7 @@ if [ $? -eq 0 ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Preserving chain
|
|
# Preserving chain
|
|
|
-chains=$VESTA/data/firewall/chains.conf
|
|
|
|
|
|
|
+chains=$HESTIA/data/firewall/chains.conf
|
|
|
check_chain=$(grep "CHAIN='$chain'" $chains 2>/dev/null)
|
|
check_chain=$(grep "CHAIN='$chain'" $chains 2>/dev/null)
|
|
|
if [ -z "$check_chain" ]; then
|
|
if [ -z "$check_chain" ]; then
|
|
|
echo "CHAIN='$chain' PORT='$port' PROTOCOL='$protocol'" >> $chains
|
|
echo "CHAIN='$chain' PORT='$port' PROTOCOL='$protocol'" >> $chains
|
|
@@ -83,7 +83,7 @@ chmod 660 $chains
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
-# Vesta #
|
|
|
|
|
|
|
+# Hestia #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
# Logging
|
|
# Logging
|