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