Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
function get_devices()
|
||||
{
|
||||
exec("lsblk -J", $raw, $retval);
|
||||
|
||||
if ($retval != 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = json_decode(implode("", $raw));
|
||||
|
||||
return $data->blockdevices;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user