Check old-styled-config and check write-permissions
This commit is contained in:
parent
09e8c929d1
commit
cfa48e23b6
2 changed files with 16 additions and 4 deletions
|
@ -55,10 +55,17 @@ function createConfigLines() {
|
|||
}
|
||||
|
||||
function checkSetup() {
|
||||
if (file_exists ("setup.php")) {
|
||||
if (null == DISTRIBUTION) {
|
||||
?>
|
||||
<div class="alert alert-danger" role="alert">You forgot to remove setup.php in root-directory of your dashboard! Please delete the file!</div>
|
||||
<div class="alert alert-danger" role="alert">You are using an old config.php. Please configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
} else {
|
||||
if (file_exists ("setup.php")) {
|
||||
?>
|
||||
<div class="alert alert-danger" role="alert">You forgot to remove setup.php in root-directory of your dashboard or you forgot to configure it! Please delete the file or configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -20,7 +20,12 @@ include "include/tools.php";
|
|||
<?php
|
||||
if ($_GET['cmd'] =="writeconfig") {
|
||||
if (!file_exists('./config')) {
|
||||
mkdir('./config', 0777, true);
|
||||
if (!mkdir('./config', 0777, true)) {
|
||||
?>
|
||||
<div class="alert alert-danger" role="alert">You forgot to give write-permissions to your webserver-user, see point 3 in <a href="linux-step-by-step.md">linux-step-by-step.md</a>!</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
$configfile = fopen("config/config.php", 'w');
|
||||
fwrite($configfile,"<?php\n");
|
||||
|
|
Loading…
Reference in a new issue