Maintenance Mode is a state in Team Password Manager in which no one can work with the software (except for upgrading it). Maintenance Mode is available since version 7.103.208.
When Maintenance Mode is enabled:
- Users cannot sign in.
- Signed in users cannot work (but they're not logged out).
- API requests return "Service Unavailable" (status code 503), with the message: "This installation is in Maintenance Mode.".
- genexp and ldapsync processes are not executed (returning status code 503 - Service Unavailable), but if they're in a middle of execution they'll complete the process.
When Maintenance Mode is enabled and anyone tries to access the software, this screen is shown (the message can be configured):
When is Maintenance Mode used?
Since when Maintenance Mode is enabled no one is using the software it's the perfect time to do database maintenance or backups. But there's a special case in which putting Team Password Manager in Maintenance Mode is required: upgrades.
Since version 7.103.208, before upgrading the software, you need to enable Maintenance Mode. If you don't, the following message is shown in the upgrade screen and you can't upgrade:
Note that enabling Maintenance Mode is not required when installing the software, only when upgrading it.
Enabling and disabling Maintenance Mode
To enable or disable Maintenance Mode you set the
MAINTENANCE_MODE parameter in
FALSE, like this:
- Enable Maintenance Mode:
- Disable Maintenance Mode:
FALSE is the default value, so you can also comment out the define statement or simple not use it if you want to disable Maintenance Mode.
Changing the Maintenance Mode message
The message shown by default when Maintenance Mode is enabled is "This installation is in Maintenance Mode. Please contact your administrator." You can change this message using the
MAINTENANCE_MESSAGE parameter in
config.php, like this:
define('MAINTENANCE_MESSAGE', 'This is another message.');
Note that the default message is not translated so if you want to offer its translation to your users you can to it with this parameter.