server
server copied to clipboard
Implement occ status command via return codes v2 (Fixes: #35704)
Signed-off-by: Lee Garrett [email protected]
- Resolves: #35704
Summary
This is an improved version of my earlier PR #35830. This is now a parameter to status
, so it allows for adding more return codes later, which can then for example be consumed in systemd units, or monitoring checks.
It adds a parameter that can be used in scripts. ./occ status -e
returns 0 when operating normally, and 1 if there is maintenance mode, 2 if ./occ upgrade
is required.
TODO
- [ ] Test coverage?
Checklist
- [x] Code is properly formatted
- [x] Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)