copy index.surrogator.html to index.html if it does not exist
[surrogator.git] / surrogator.php
index 6519f5b7a67c694a4a7f6bacd49cc5dd8303af56..c7c9d5491d70ba4d5781f24518b06206950a955a 100755 (executable)
@@ -122,6 +122,11 @@ foreach (array('mm.png', 'default.png') as $resFile) {
     }
 }
 
+if (!file_exists($wwwDir . '/index.html') && is_writable($wwwDir)) {
+    log('no index.html found, copying default over', 1);
+    copy($wwwDir . '/index.surrogator.html', $wwwDir . '/index.html');
+}
+
 if (count($files)) {
     $fileInfos = array();
     foreach ($files as $file) {