Installation script refuses to run again after completed install.

This is achieved by leaving special file in install/ directory.
This commit is contained in:
uroskn
2016-07-02 22:58:57 +02:00
parent 7eee626408
commit 5fc5c76b72
3 changed files with 9 additions and 1 deletions
+3
View File
@@ -17,3 +17,6 @@ GameEngine/config.php
# Ignore generated prevention and notes
GameEngine/Prevention/*
GameEngine/Notes/*
# Install instalation_done marker left by install script
install/installation_done
+5 -1
View File
@@ -83,7 +83,11 @@ function proceed() {
<?php
if(substr(sprintf('%o', fileperms('../')), -4)<'700'){
echo"<span class='f18 c5'>ERROR!</span><br />It's not possible to write the config file. Change the permission to '777'. After that, refresh this page!";
} else
}
else if (file_exists("installation_done")) {
echo"<span class='f18 c5'>ERROR!</span><br />Installation appears to have been completed.<br />If this is an error remove installation_done file in install directory.";
}
else
switch($_GET['s']){
case 0:
include("templates/greet.tpl");
+1
View File
@@ -24,6 +24,7 @@ All the files are placed. The database is created, so you can now start playing
<?php include("../GameEngine/config.php");
$time = time();
rename("../install/","../installed_".$time);
touch("installation_done");
?>
<p>
<center><font size="4"><a href="<?php echo HOMEPAGE; ?>">> My TravianZ homepage <</font></a></center>