From 52f46264521fdb9a46abab0ddb66dbc524847756 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 25 Mar 2020 16:31:38 -0600 Subject: [PATCH] Update functions.php --- resources/functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 185133da0e..9e3b283964 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -107,15 +107,12 @@ if (PHP_OS === 'FreeBSD') { $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)) { $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') { $uuid = trim(com_create_guid(), '{}'); }