summaryrefslogtreecommitdiffstats
path: root/core/register_command.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-21 20:52:32 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-23 16:47:47 +0100
commitbcd10d3dc52f2a6fa187895526eac05b48ddb7f9 (patch)
tree8f721cce7ebc7d526f49810e844d1558fdeb2045 /core/register_command.php
parent1fd1b355e46aba83917c81ddc91a369598f9e6e1 (diff)
downloadnextcloud-server-bcd10d3dc52f2a6fa187895526eac05b48ddb7f9.tar.gz
nextcloud-server-bcd10d3dc52f2a6fa187895526eac05b48ddb7f9.zip
implement command maintenance:install
Diffstat (limited to 'core/register_command.php')
-rw-r--r--core/register_command.php37
1 files changed, 21 insertions, 16 deletions
diff --git a/core/register_command.php b/core/register_command.php
index 4af423054d7..c62282c084c 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -24,23 +24,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-$repair = new \OC\Repair(\OC\Repair::getRepairSteps());
/** @var $application Symfony\Component\Console\Application */
$application->add(new OC\Core\Command\Status);
-$application->add(new OC\Core\Command\Db\GenerateChangeScript());
-$application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory()));
-$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
-$application->add(new OC\Core\Command\Maintenance\SingleUser());
-$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
-$application->add(new OC\Core\Command\App\CheckCode());
-$application->add(new OC\Core\Command\App\Disable());
-$application->add(new OC\Core\Command\App\Enable());
-$application->add(new OC\Core\Command\App\ListApps());
-$application->add(new OC\Core\Command\Maintenance\Repair($repair, \OC::$server->getConfig()));
-$application->add(new OC\Core\Command\User\Report());
-$application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
-$application->add(new OC\Core\Command\User\LastSeen());
-$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
-$application->add(new OC\Core\Command\L10n\CreateJs());
+if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
+ $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
+
+ $application->add(new OC\Core\Command\Db\GenerateChangeScript());
+ $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory()));
+ $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\Maintenance\SingleUser());
+ $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\App\CheckCode());
+ $application->add(new OC\Core\Command\App\Disable());
+ $application->add(new OC\Core\Command\App\Enable());
+ $application->add(new OC\Core\Command\App\ListApps());
+ $application->add(new OC\Core\Command\Maintenance\Repair($repair, \OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\User\Report());
+ $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
+ $application->add(new OC\Core\Command\User\LastSeen());
+ $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
+ $application->add(new OC\Core\Command\L10n\CreateJs());
+} else {
+ $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getConfig()));
+}