1. Lock the site and run a custom maintenance script
Go to the «maintenance plugin» page in the backend.
Click on the «Lock» button to lock the site from writing.
Log in your server and run some scripts, and wait until they are finished.
Click on the «Unlock» button to unlock the site.
2. Run a pre-defined maintenance script and lock the site until it's finished
Go to the config manager and make plugin»maintenance»script point to your custom script. (See bin/sample.sh for an example)
Go to the «maintenance plugin» page in the backend and click on the «Start» button to run the script, the site is automatically locked and will be unlocked when it's finished.
If something seems to go wrong, you can click on the «Stop» button to kill the script previously started.
3. Run a pre-defined maintenance script periodically and lock the site every time until it's finished
Go to the config manager and make plugin»maintenance»script point to your custom script.
Check the plugin»maintenance»script_auto button and set plugin»maintenance»script_auto_interval to an interval you like.
The maintenance script will run automatically (and locks the site until it's finished) once your site is visited and it hadn't been run during the past interval seconds.
It is advised that your maintenance script is set to sleep for a certain time until it's a rather non-busy time.
4. Other notice
This plugin is designed under the Unix system, and is not guaranteed to work on Windows or other OS.