Просмотр исходного кода

[Bug] Panel header (#2680)

* Fix issue with multiplying with text

When users set: Alias 10 / domain and unlimited domains an error is created. When domains is set to "Unlimited" and aliasses is set to a finite number "unlimted sign" number is shown. 

Also apply for mail accounts and dns records.
Ideally we need to change this behaviour

* Fix #2670 Display of path missing domain name

* Remove chkconfig

Deprecated by Ubuntu in 2013
https://forum.hestiacp.com/t/v-update-firewall-fail-in-ubuntu-20-04/6682

* #2681 Rebuild websites and mail domains after php version change

* #2678 DNS resolving fails on some new domains 

Allowing to test against Cloudflare to make sure it works will not take that longer after local look up fails
Jaap Marcus 3 лет назад
Родитель
Сommit
008b4b1258

+ 4 - 1
bin/v-add-letsencrypt-domain

@@ -187,7 +187,10 @@ if [ "$proto" = "http-01" ]; then
             identifier=$(idn2 --quiet $identifier)
         fi
         if ! nslookup "${identifier}" > /dev/null 2>&1 ; then
-            check_result "$E_NOTEXIST" "DNS record for $identifier doesn't exist"
+            # Attempt against Cloudflare DNS
+            if ! nslookup "${identifier}" 1.1.1.1 > /dev/null 2>&1 ; then
+                check_result "$E_NOTEXIST" "DNS record for $identifier doesn't exist"
+            fi
         fi
     done
 fi

+ 11 - 0
bin/v-change-sys-php

@@ -48,7 +48,18 @@ php_fpm="/etc/init.d/php$version-fpm"
 
 rm -f /etc/php/*/fpm/pool.d/www.conf
 cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$version/fpm/pool.d/www.conf
+
+for user in $($HESTIA/bin/v-list-sys-users plain); do
+    $BIN/v-rebuild-web-domains "$user" 'no' >/dev/null 2>&1
+    $BIN/v-rebuild-mail-domains "$user" 'no' >/dev/null 2>&1
+done;
+
+# restart
 $HESTIA/bin/v-restart-web-backend
+$HESTIA/bin/v-restart-web
+$HESTIA/bin/v-restart-proxy
+
+
 
 update-alternatives --set php /usr/bin/php$version
 

+ 0 - 3
bin/v-update-firewall

@@ -179,9 +179,6 @@ fi
 # Saving rules to the master iptables file
 if [ -d "/etc/sysconfig" ]; then
     /sbin/iptables-save > /etc/sysconfig/iptables
-    if [ -z "$(ls /etc/rc3.d/S*iptables 2>/dev/null)" ]; then
-        /sbin/chkconfig iptables on
-    fi
 else
     /sbin/iptables-save > /etc/iptables.rules
     iptablesversion=$(iptables --version | head -1 | awk '{print $2}' | cut -f -2 -d .);

+ 1 - 3
web/edit/web/index.php

@@ -118,9 +118,7 @@ $v_ftp_path = $data[$v_domain]['FTP_PATH'];
 if (!empty($v_ftp_user)) {
     $v_ftp_password = "";
 }
-
-
-if (isset($v_custom_doc_domain)) {
+if (isset($v_custom_doc_domain) && $v_custom_doc_domain != '') {
     $v_ftp_user_prepath = '/home/'.$user_plain.'/web/'.$v_custom_doc_domain;
 } else {
     $v_ftp_user_prepath = '/home/'.$user_plain.'/web/'.$v_domain;

+ 3 - 3
web/templates/includes/panel.html

@@ -125,7 +125,7 @@
 							<div class="l-stat__col-title"><?=_('WEB');?>&nbsp;&nbsp;<i class="fas fa-globe-americas"></i></div>
 							<ul>
 								<li><?=_('domains');?>: <span><?=$panel[$user]['U_WEB_DOMAINS']?> / <?=$panel[$user]['WEB_DOMAINS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['WEB_DOMAINS']?> (<?=$panel[$user]['SUSPENDED_WEB']?>)</span></li>
-								<li><?=_('aliases');?>: <span><?=$panel[$user]['U_WEB_ALIASES']?> / <?=$panel[$user]['WEB_ALIASES']=='unlimited' ? "<b>∞</b>" : $panel[$user]['WEB_ALIASES'] * $panel[$user]['WEB_DOMAINS']?></span></li>
+								<li><?=_('aliases');?>: <span><?=$panel[$user]['U_WEB_ALIASES']?> / <?=$panel[$user]['WEB_ALIASES']=='unlimited' || $panel[$user]['WEB_DOMAINS']=='unlimited'  ? "<b>∞</b>" : $panel[$user]['WEB_ALIASES'] * $panel[$user]['WEB_DOMAINS']?></span></li>
 							</ul>
 						</a>
 					</div>
@@ -140,7 +140,7 @@
 							<div class="l-stat__col-title"><?=_('DNS');?>&nbsp;&nbsp;<i class="fas fa-atlas"></i></div>
 							<ul>
 								<li><?=_('zones');?>: <span><?=$panel[$user]['U_DNS_DOMAINS']?> / <?=$panel[$user]['DNS_DOMAINS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['DNS_DOMAINS']?> (<?=$panel[$user]['SUSPENDED_DNS']?>)</span></li>
-								<li><?=_('records');?>: <span><?=$panel[$user]['U_DNS_RECORDS']?> / <?=$panel[$user]['DNS_RECORDS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['DNS_RECORDS'] * $panel[$user]['DNS_DOMAINS']?></span></li>
+								<li><?=_('records');?>: <span><?=$panel[$user]['U_DNS_RECORDS']?> / <?=$panel[$user]['DNS_RECORDS']=='unlimited' || $panel[$user]['DNS_DOMAINS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['DNS_RECORDS'] * $panel[$user]['DNS_DOMAINS']?></span></li>
 							</ul>
 						</a>
 					</div>
@@ -155,7 +155,7 @@
 							<div class="l-stat__col-title"><?=_('MAIL');?>&nbsp;&nbsp;<i class="fas fa-mail-bulk"></i></div>
 							<ul>
 								<li><?=_('domains');?>: <span><?=$panel[$user]['U_MAIL_DOMAINS']?> / <?=$panel[$user]['MAIL_DOMAINS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['MAIL_DOMAINS']?> (<?=$panel[$user]['SUSPENDED_MAIL']?>)</span></li>
-								<li><?=_('accounts');?>: <span><?=$panel[$user]['U_MAIL_ACCOUNTS']?> / <?=$panel[$user]['MAIL_ACCOUNTS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['MAIL_ACCOUNTS'] * $panel[$user]['MAIL_DOMAINS']?></span></li>
+								<li><?=_('accounts');?>: <span><?=$panel[$user]['U_MAIL_ACCOUNTS']?> / <?=$panel[$user]['MAIL_ACCOUNTS']=='unlimited' || $panel[$user]['MAIL_DOMAINS']=='unlimited' ? "<b>∞</b>" : $panel[$user]['MAIL_ACCOUNTS'] * $panel[$user]['MAIL_DOMAINS']?></span></li>
 							</ul>
 						</a>
 					</div>