Browse Source

Update functions.php

FusionPBX 5 years ago
parent
commit
b990f41fc6
1 changed files with 2 additions and 5 deletions
  1. 2 5
      resources/functions.php

+ 2 - 5
resources/functions.php

@@ -107,15 +107,12 @@
 			if (PHP_OS === 'FreeBSD') {
 			if (PHP_OS === 'FreeBSD') {
 				$uuid = trim(shell_exec("uuidgen"));
 				$uuid = trim(shell_exec("uuidgen"));
 			}
 			}
-			if (PHP_OS === 'Linux') {
-				$uuid = trim(shell_exec("uuidgen -r"));
+			if (PHP_OS === 'Linux' && !is_uuid($uuid)) {
+				$uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid'));
 			}
 			}
 			if (!is_uuid($uuid)) {
 			if (!is_uuid($uuid)) {
 				$uuid = trim(shell_exec("uuidgen"));
 				$uuid = trim(shell_exec("uuidgen"));
 			}
 			}
-			if (!is_uuid($uuid) && PHP_OS === 'Linux') {
-				$uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid'));
-			}
 			if (function_exists('com_create_guid') === true && PHP_OS === 'Windows') {
 			if (function_exists('com_create_guid') === true && PHP_OS === 'Windows') {
 				$uuid = trim(com_create_guid(), '{}');
 				$uuid = trim(com_create_guid(), '{}');
 			}
 			}