Update functions.php
This commit is contained in:
@@ -105,7 +105,12 @@
|
|||||||
function uuid() {
|
function uuid() {
|
||||||
$uuid = null;
|
$uuid = null;
|
||||||
if (PHP_OS === 'FreeBSD') {
|
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)) {
|
if (PHP_OS === 'Linux' && !is_uuid($uuid)) {
|
||||||
$uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid'));
|
$uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid'));
|
||||||
|
|||||||
Reference in New Issue
Block a user