Wait for the config file to be written.
This commit is contained in:
parent
62f0be7b92
commit
39bec6b666
2 changed files with 14 additions and 6 deletions
|
@ -435,8 +435,8 @@ function write_config() { // {{{
|
|||
mkdir("data/config", 0755, true);
|
||||
}
|
||||
|
||||
if(!file_put_contents("data/config/shimmie.conf.php", $file_content)) {
|
||||
$h_file_content = htmlentities($file_content);
|
||||
if(!file_put_contents("data/config/shimmie.conf.php", $file_content, LOCK_EX)) {
|
||||
$h_file_content = htmlentities($file_content);[
|
||||
print <<<EOD
|
||||
<div id="installer">
|
||||
<h1>Shimmie Installer</h1>
|
||||
|
|
|
@ -30,15 +30,23 @@ define("_TRAVIS_DATABASE", $db);
|
|||
$test_suite = new TestSuite('Shimmie tests');
|
||||
$test_suite->add(new ShimmieInstallerTest());
|
||||
|
||||
//
|
||||
// From index.php
|
||||
//
|
||||
// Wait for the config file to be written.
|
||||
|
||||
clearstatcache();
|
||||
$timeout = 5;
|
||||
|
||||
while ($timeout > 0 && !file_exists("data/config/shimmie.conf.php")) {
|
||||
sleep(1);
|
||||
$timout--;
|
||||
clearstatcache();
|
||||
}
|
||||
|
||||
require_once("core/sys_config.inc.php");
|
||||
include "data/config/shimmie.conf.php";
|
||||
|
||||
//
|
||||
// The code below is from index.php
|
||||
//
|
||||
|
||||
// set up and purify the environment
|
||||
_version_check();
|
||||
_sanitise_environment();
|
||||
|
|
Reference in a new issue