Commit 6d27ca80 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

check if link exists

parent 8d0a92a7
......@@ -27,16 +27,17 @@ if (isset($_GET['cmd']))
else if (isset($argv[1]))
$cmd = $argv[1];
#hardcoded
#hardcoded for eyesis4pi
$symlink = "/www/pages/ssd";
$mountpoint = "/mnt/sda1";
switch($cmd){
case "symlink":
symlink($mountpoint,$symlink);
if (is_link($symlink)) die("already exists");
die(symlink($mountpoint,$symlink));
break;
default:
print("nothing is done");
print("nothing has been done");
}
?>
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