فهرست منبع

IPV6: Correction of some errors after shell and yarn check

asmcc 2 سال پیش
والد
کامیت
420986b85b
5فایلهای تغییر یافته به همراه27 افزوده شده و 28 حذف شده
  1. 0 2
      .yarnrc.yml
  2. 21 21
      bin/v-change-dns-domain-ipv6
  3. 2 1
      bin/v-delete-sys-ip
  4. 2 2
      install/hst-install-debian.sh
  5. 2 2
      install/hst-install-ubuntu.sh

+ 0 - 2
.yarnrc.yml

@@ -1,3 +1 @@
 nodeLinker: node-modules
-
-yarnPath: .yarn/releases/yarn-3.5.1.cjs

+ 21 - 21
bin/v-change-dns-domain-ipv6

@@ -56,39 +56,39 @@ check_hestia_demo_mode
 #----------------------------------------------------------#
 
 if [ "$ipv6" != "no" ]; then
-    is_format_valid 'ipv6'
+	is_format_valid 'ipv6'
 fi
 if [ "$ipv6" != "no" ]; then
-    is_ipv6_valid "$ipv6" "$user"
+	is_ipv6_valid "$ipv6" "$user"
 else
-    ipv6=''
+	ipv6=''
 fi
 
 # Get old ip
 get_domain_values 'dns'
-if [ -z @"$ipv6" ] && [ -z "$IP" ]; then
-    check_result $E_INVALID "IP or IPv6 is required"
+if [ -z "$ipv6" ] && [ -z "$IP" ]; then
+	check_result $E_INVALID "IP or IPv6 is required"
 fi
 old=$IP6
 
 if [ -z "$old" ]; then
-    #Create new
-    # Generating timestamp
-    time_n_date=$(date +'%T %F')
-    time=$(echo "$time_n_date" |cut -f 1 -d \ )
-    date=$(echo "$time_n_date" |cut -f 2 -d \ )
-    ip=""
-    add_dns_config_records
+	#Create new
+	# Generating timestamp
+	time_n_date=$(date +'%T %F')
+	time=$(echo "$time_n_date" | cut -f 1 -d \ )
+	date=$(echo "$time_n_date" | cut -f 2 -d \ )
+	ip=""
+	add_dns_config_records
 else
-    if [ ! -z "$ipv6" ]; then
-        # Changing records
-        sed -i "s/$old/$ipv6/g" $USER_DATA/dns/$domain.conf
-    else
-        #Delete configs
-        ipv6=""
-        ip=$IP
-        remove_dns_config_records
-    fi
+	if [ ! -z "$ipv6" ]; then
+		# Changing records
+		sed -i "s/$old/$ipv6/g" $USER_DATA/dns/$domain.conf
+	else
+		#Delete configs
+		ipv6=""
+		ip=$IP
+		remove_dns_config_records
+	fi
 fi
 
 # Changing ip

+ 2 - 1
bin/v-delete-sys-ip

@@ -76,7 +76,8 @@ else
 	cidr_prefixlen=$(convert_netmask "$netmask")
 fi
 
-host_ip_check=$(hostname -i | sed -ne "/$ip46/p")                                                # check, if IP address is primary (listed in /etc/hosts)
+host_ip_check=$(hostname -i | sed -ne "/$ip46/p") # check, if IP address is primary (listed in /etc/hosts)
+# shellcheck disable=SC1087
 interface=$($BIN/v-list-network plain | sed -ne "/$ip46/s/$ip46[ \t]*\/[0-9]*[ \t]*\(.*\)/\1/p") # interface for IP address
 number_of_ips=$(/sbin/ip${check_ip_par} addr | grep -c global)                                   # number of global system IP addresses
 

+ 2 - 2
install/hst-install-debian.sh

@@ -2098,13 +2098,13 @@ fi
 
 # Adding default domain
 if [ -n "$ip" ]; then
-	if [ -n "ipv6" ]; then
+	if [ -n "$ipv6" ]; then
 		${HESTIA}/bin/v-add-web-domain admin ${servername} ${ip} ${ipv6}
 	else
 		${HESTIA}/bin/v-add-web-domain admin ${servername} ${ip}
 	fi
 else
-	if [ -n "ipv6" ]; then
+	if [ -n "$ipv6" ]; then
 		${HESTIA}/bin/v-add-web-domain admin ${servername} "" ${ipv6}
 	fi
 fi

+ 2 - 2
install/hst-install-ubuntu.sh

@@ -2175,13 +2175,13 @@ fi
 
 # Adding default domain
 if [ -n "$ip" ]; then
-	if [ -n "ipv6" ]; then
+	if [ -n "$ipv6" ]; then
 		${HESTIA}/bin/v-add-web-domain admin ${servername} ${ip} ${ipv6}
 	else
 		${HESTIA}/bin/v-add-web-domain admin ${servername} ${ip}
 	fi
 else
-	if [ -n "ipv6" ]; then
+	if [ -n "$ipv6" ]; then
 		${HESTIA}/bin/v-add-web-domain admin ${servername} "" ${ipv6}
 	fi
 fi