X-Git-Url: https://git.cweiske.de/surrogator.git/blobdiff_plain/5e267e734b04a44116351dfb5442541b1d699a87..fc412baac7378a01d9c5ab90405365b56d3abe4b:/surrogator.php diff --git a/surrogator.php b/surrogator.php index c7c9d54..fdbd384 100755 --- a/surrogator.php +++ b/surrogator.php @@ -118,13 +118,14 @@ foreach ($sizes as $size) { foreach (array('mm.png', 'default.png') as $resFile) { if (!file_exists($rawDir . '/' . $resFile)) { log($resFile . ' missing, copying it from res/', 2); - copy(__DIR__ . '/res/' . $resFile, $rawDir . '/' . $resFile); + copy($resDir . '/' . $resFile, $rawDir . '/' . $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'); +foreach (array('index.html', 'robots.txt', 'favicon.ico') as $resFile) { + if (!file_exists($wwwDir . '/' . $resFile) && is_writable($wwwDir)) { + log('no www/' . $resFile . ' found, copying default over', 1); + copy($resDir . '/www/' . $resFile, $wwwDir . '/' . $resFile); + } } if (count($files)) {