X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=www%2Findex.php;h=bf3bc2c938bfa3b561602d1827fb8dd08a54a06a;hp=aa5455cdcc95f5a34109e99b130804b8f378c85b;hb=e94422dfbe479216e5ddd6df3bdd83e066887a79;hpb=00e07490847f46823e05edfb9e957e1b99487c50 diff --git a/www/index.php b/www/index.php index aa5455c..bf3bc2c 100644 --- a/www/index.php +++ b/www/index.php @@ -22,24 +22,14 @@ glcas_pluginLoader(); $configpath = ""; // TODO: do this better -if(file_exists($WEB_ROOT_FS."/../var")) { - - // is it there? - if(file_exists($WEB_ROOT_FS."/../var/glcas/webconfig")) { - $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); - } else { - // if not, attempt to create - if(!file_exists($WEB_ROOT_FS."/../var/glcas")) { - mkdir($WEB_ROOT_FS."/../var/glcas"); - } - // success! - touch("$WEB_ROOT_FS/../var/glcas/webconfig"); - $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); - } -} - +$configpath = glcas_getWebConfigPath(); header("Accept-Ranges: bytes"); +if($configpath == false) { + glcas_startInstaller(); + return; +} + $glconfig = new GLCASConfig(); $glconfig->loadConfig($configpath); $webResponder = new GLCASWeb($glconfig);