summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2021-06-13 10:08:17 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2023-01-10 11:59:05 +0000
commit467c8a9d787b0005e05aa36154d7036b377b3221 (patch)
treef12677fa124f09bb1a83e6287252aa88a8aa1900
parent10cca65ba6f9185dbe199509fafbcb14bc565324 (diff)
downloadnextcloud-server-467c8a9d787b0005e05aa36154d7036b377b3221.tar.gz
nextcloud-server-467c8a9d787b0005e05aa36154d7036b377b3221.zip
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>
-rw-r--r--lib/private/Setup.php3
1 files changed, 3 insertions, 0 deletions
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();