summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-01-18 19:53:02 +0100
committerGitHub <noreply@github.com>2023-01-18 19:53:02 +0100
commit06a572ff55b193f51930571c5bb686787f709c67 (patch)
tree5c6a609dec0b2ddc68280aea60937cfbcabdacef /lib/private
parentc5a01695d141b80fc1b5802e629ede8044658d57 (diff)
parent644df591b138d28b1631ecc13ebe600c16a909f1 (diff)
downloadnextcloud-server-06a572ff55b193f51930571c5bb686787f709c67.tar.gz
nextcloud-server-06a572ff55b193f51930571c5bb686787f709c67.zip
Merge pull request #27492 from cyclops8456/feature/24301-remove-can-install-on-occ-maintenance-install
Remove the CAN_INSTALL file when occ maintenance:install is complete
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Setup.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 7b08fb2f66f..e84a5e4987a 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 (self::shouldRemoveCanInstallFile()) {
+ unlink(\OC::$configDir.'/CAN_INSTALL');
+ }
$bootstrapCoordinator = \OC::$server->query(\OC\AppFramework\Bootstrap\Coordinator::class);
$bootstrapCoordinator->runInitialRegistration();
@@ -596,4 +599,18 @@ class Setup {
'channel' => (string)$OC_Channel,
];
}
+
+ /**
+ * @return bool
+ */
+ public function shouldRemoveCanInstallFile() {
+ return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL');
+ }
+
+ /**
+ * @return bool
+ */
+ public function canInstallFileExists() {
+ return is_file(\OC::$configDir.'/CAN_INSTALL');
+ }
}