aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLee Garrett <lgarrett@rocketjump.eu>2022-12-22 22:03:21 +0100
committerLee Garrett <lgarrett@rocketjump.eu>2023-01-03 10:58:07 +0100
commitfba906e34a35ab31a334421edacdd7d4d29b1d7f (patch)
tree05e2685e616f7f7af55a6474697f10eff2fc668c /lib
parent5b64b8119fc9c004887b514722bcecc2353564de (diff)
downloadnextcloud-server-fba906e34a35ab31a334421edacdd7d4d29b1d7f.tar.gz
nextcloud-server-fba906e34a35ab31a334421edacdd7d4d29b1d7f.zip
Implement occ status command via return codes (Fixes: #35704)
Running `./occ status -e` will produce any output. However, it will: exit 0 during normal operation, exit 1 when in maintenance mode, exit 2 when `./occ upgrade` is needed. Signed-off-by: Lee Garrett <lgarrett@rocketjump.eu>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Console/Application.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index fc48f57e499..2b48f9f5ada 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -181,7 +181,8 @@ class Application {
InputInterface $input, ConsoleOutputInterface $output
) {
if ($input->getArgument('command') !== '_completion'
- && $input->getArgument('command') !== 'maintenance:mode') {
+ && $input->getArgument('command') !== 'maintenance:mode'
+ && $input->getArgument('command') !== 'status') {
$errOutput = $output->getErrorOutput();
$errOutput->writeln(
'<comment>Nextcloud is in maintenance mode, hence the database isn\'t accessible.' . PHP_EOL .