- Create the 'vrrd' directory if it does not exist.

git-svn-id: http://www.observium.org/svn/observer/trunk@1917 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts
2011-03-17 21:16:33 +00:00
parent 5c83b3f521
commit 0fb92ed816
+3
View File
@@ -24,6 +24,9 @@ if ($dataHandle)
if ($argv[1] == "--cron")
{
if (is_file('vrrd')) { echo("ERROR: 'vrrd' is not a directory!\n"); exit; }
if (is_dir('vrrd') && !is_writable('vrrd')) { echo("ERROR: I can not write in the 'vrrd' directory!\n"); exit; }
if (!is_dir('vrrd')) { mkdir('vrrd'); }
$fd = fopen('vrrd/version.txt','w');
fputs($fd, "$major.$minor.$release");
fclose($fd);