Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-08 01:19:23 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-08 01:19:23 +0300
commitf099c9883e4f1073564cb2ffaa00472f3ed6d8ae (patch)
tree04d418920c044f7639b11dfa96920d149a2978f5 /console.php
parent6c327f8331617652ef0b268d51edc6a23624e33c (diff)
Adding check command to validate server environment - fixes #15429
Diffstat (limited to 'console.php')
-rw-r--r--console.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/console.php b/console.php
index a4d829f683a..7536908a5c1 100644
--- a/console.php
+++ b/console.php
@@ -24,6 +24,7 @@
*/
use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\ArgvInput;
define('OC_CONSOLE', 1);
@@ -71,6 +72,18 @@ try {
} else {
echo "ownCloud is not installed - only a limited number of commands are available" . PHP_EOL;
}
+ $input = new ArgvInput();
+ if ($input->getFirstArgument() !== 'check') {
+ $errors = \OC_Util::checkServer(\OC::$server->getConfig());
+ if (!empty($errors)) {
+ foreach ($errors as $error) {
+ echo $error['error'] . "\n";
+ echo $error['hint'] . "\n\n";
+ }
+ exit(1);
+ }
+ }
+
$application->run();
} catch (Exception $ex) {
echo "An unhandled exception has been thrown:" . PHP_EOL;