<?php
$mountCheck = "ls /media/veracrypt/check/";
// if file 'accept' exists, then disk is mounted
if (exec($mountCheck) == 'accept') $mountStatus = "mounted";
else $mountStatus = "dismounted";
$result = $mountStatus;
echo $result;
?>