From 467c8a9d787b0005e05aa36154d7036b377b3221 Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sun, 13 Jun 2021 10:08:17 +0100 Subject: [PATCH] Remove the CAN_INSTALL file when occ maintenance:install is complete When occ maintenance:install is run from the CLI, the CAN_INSTALL in the config directory is left in place when installed is set to true, whereas this file is removed when the web installer is used. Removing this file in the CLI command maintains consistency between the two. This allows automation tools an easier way to determine if this process has been completed. Signed-off-by: Alex Harpin --- lib/private/Setup.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 7b08fb2f66f..d1936f55f28 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -419,6 +419,9 @@ class Setup { //and we are done $config->setSystemValue('installed', true); + if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { + unlink(\OC::$configDir.'/CAN_INSTALL'); + } $bootstrapCoordinator = \OC::$server->query(\OC\AppFramework\Bootstrap\Coordinator::class); $bootstrapCoordinator->runInitialRegistration();