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 <development@landsofshadow.co.uk>
This commit is contained in:
Alex Harpin 2021-06-13 10:08:17 +01:00
parent 10cca65ba6
commit 467c8a9d78

View file

@ -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();