Explorar o código

Merge branch 'main' into staging/1.5.1

Jaap Marcus %!s(int64=4) %!d(string=hai) anos
pai
achega
d930226d92
Modificáronse 2 ficheiros con 10 adicións e 2 borrados
  1. 9 0
      web/list/server/index.php
  2. 1 2
      web/templates/pages/list_services.html

+ 9 - 0
web/list/server/index.php

@@ -119,6 +119,15 @@ if (isset($_GET['db'])) {
 exec (HESTIA_CMD."v-list-sys-info json", $output, $return_var);
 $sys = json_decode(implode('', $output), true);
 unset($output);
+
+exec (HESTIA_CMD."v-list-sys-php json", $output, $return_var);
+$php = json_decode(implode('', $output), true);
+unset($output);
+$phpfpm = array();
+foreach($php as $version){
+    $phpfpm[] = 'php'.$version.'-fpm';
+}
+
 exec (HESTIA_CMD."v-list-sys-services json", $output, $return_var);
 $data = json_decode(implode('', $output), true);
 ksort($data);

+ 1 - 2
web/templates/pages/list_services.html

@@ -118,8 +118,7 @@
 				$spnd_icon = 'fa-play';
 				$state_icon = 'fa-minus-circle status-icon red';
 			}
-
-			if (($key == "php5.6-fpm") || ($key == "php7.0-fpm") || ($key == "php7.1-fpm") || ($key == "php7.2-fpm") || ($key == "php7.3-fpm") || ($key == "php7.4-fpm") || ($key == "php8.0-fpm")) {
+			if(in_array($key, $phpfpm)){
 				$edit_url="php";
 			} else {
 				$edit_url=$key;