From f099c9883e4f1073564cb2ffaa00472f3ed6d8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 8 Apr 2015 00:19:23 +0200 Subject: Adding check command to validate server environment - fixes #15429 --- console.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'console.php') 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; -- cgit v1.2.3