Use uuidgen on FreeBSD

This commit is contained in:
FusionPBX 2024-08-26 20:33:05 -06:00 committed by GitHub
parent d45f6ddae0
commit 979917468c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -149,12 +149,11 @@
function uuid() {
$uuid = null;
if (PHP_OS === 'FreeBSD') {
$uuid = trim(shell_exec("uuid -v 4"));
$uuid = trim(shell_exec("uuidgen"));
if (is_uuid($uuid)) {
return $uuid;
} else {
echo "Please install the following package.\n";
echo "pkg install ossp-uuid\n";
echo "Please install uuidgen.\n";
exit;
}
}
@ -167,7 +166,7 @@
if (is_uuid($uuid)) {
return $uuid;
} else {
echo "Please install the uuidgen.\n";
echo "Please install uuidgen.\n";
exit;
}
}