Commit c1c8810a authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

check if mountpoint exists

parent 0cbbb629
......@@ -175,10 +175,14 @@ else if ($cmd=="get_hdd_space"){
$mountpoint = $_GET['mountpoint'];
else
$mountpoint = '/mnt/sda1';
if (is_dir($mountpoint)) $res = disk_free_space($mountpoint);
else $res = 0;
xml_header();
echo "<command>".$cmd."</command>";
echo "<".$cmd.">";
echo disk_free_space($mountpoint);
echo $res;
echo "</".$cmd.">";
xml_footer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment