Maintenance mode from the command line
Number of replies: 3
Is it possible to set the site into Maintenance mode from the linux command line?
Re: Maintenance mode from the command line
I think the question itself is some sort of "command line magic" - quick, short and sweet ;)
Re: Maintenance mode from the command line
You can put the site into maintenance mode by creating the following file:
moodle_data_directory/SITEID/maintenance.html
where SITEID is the id of the site 'course' - usually '1'
The content of maintenance.html is the message displayed to non-admin users when they try to access the site. If you just want the standard message displayed then something like "touch moodle_data_directory/SITEID/maintenance.html" should do the trick.
moodle_data_directory/SITEID/maintenance.html
where SITEID is the id of the site 'course' - usually '1'
The content of maintenance.html is the message displayed to non-admin users when they try to access the site. If you just want the standard message displayed then something like "touch moodle_data_directory/SITEID/maintenance.html" should do the trick.
Re: Maintenance mode from the command line
Yup! That's the way
We've got this as part of our automated upgrade scripts...
We've got this as part of our automated upgrade scripts...