浏览代码

Update functions.php

FusionPBX 5 年之前
父节点
当前提交
052d16c0e6
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      resources/functions.php

+ 6 - 1
resources/functions.php

@@ -105,7 +105,12 @@
 		function uuid() {
 			$uuid = null;
 			if (PHP_OS === 'FreeBSD') {
-				$uuid = trim(shell_exec("uuidgen"));
+				$uuid = trim(shell_exec("uuid -v 4"));
+				if (!is_uuid($uuid)) {
+					echo "Please install the following package.\n";
+					echo "pkg install ossp-uuid\n";
+					exit;
+				}
 			}
 			if (PHP_OS === 'Linux' && !is_uuid($uuid)) {
 				$uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid'));