diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-12-17 23:38:48 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-12-17 23:38:48 +0100 |
commit | a7ce63cc52ec1a9060cdcac57672753fc5bf5511 (patch) | |
tree | 76f97e85e3efb7f201d168e1f64d38320a333bec | |
parent | a5f9650e97db5743c2b0aa0b645f174415866768 (diff) |
install.php: lock after a successful run
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | install.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/install.php b/install.php index ce43ac64c..a542de0cc 100644 --- a/install.php +++ b/install.php @@ -9,6 +9,10 @@ $errors = ""; define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('FCPATH', str_replace(SELF, "", __FILE__)); +if (file_exists(FCPATH."is_installed")) { + exit("already installed\n"); +} + $old_path = getenv("PATH"); putenv("PATH=$old_path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"); @@ -52,6 +56,7 @@ if ($errors != "") { echo nl2br($errors); } else { // TODO: Make this an actual installer + file_put_contents(FCPATH."is_installed", "true"); echo nl2br("Tests completed.\n" ."The following steps remain:\n" ." - copy the files from ./application/config/example/ to ./application/config/ and edit them to suit your setup\n" |