setDescription('Unlock the TYPO3 Backend'); } /** * Executes the command for removing the lock file * * @param InputInterface $input * @param OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $io->title($this->getDescription()); $lockFile = $this->getLockFileName(); if (@is_file($lockFile)) { unlink($lockFile); if (@is_file($lockFile)) { $io->caution('Could not remove lock file "' . $lockFile . '"!'); } else { $io->success('Removed lock file "' . $lockFile . '".'); } } else { $io->note('No lock file "' . $lockFile . '" was found.' . LF . 'Hence no lock can be removed.'); } } /** * Location of the file name * * @return string */ protected function getLockFileName() { return Environment::getLegacyConfigPath() . '/LOCK_BACKEND'; } }