Stopping Moodle at boot.

Stopping Moodle at boot.

by ayenack ayenack -
Number of replies: 2
Hello all.

This is most likely dead simple but I can't find an answer so I'll ask it here.

I have Moodle running on an Ubuntu 8.04 server and want to disable Moodle temporarily from starting at boot on the server how can I do this?

Thanks for all and any help!

Mark.
Average of ratings: -
In reply to ayenack ayenack

Re: Stopping Moodle at boot.

by HJWUCGA INC. -
in your config.php ... edit an invalid database connection string and it will come up with an error

redirect the error to another page (if you want to) ... you can do this in the setup.php in the /lib folder ....

look for this ...

================

.....

if (! $dbconnected) {
// In the name of protocol correctness, monitoring and performance
// profiling, set the appropriate error headers for machine comsumption
if (isset($_SERVER['SERVER_PROTOCOL'])) {
// Avoid it with cron.php. Note that we assume it's HTTP/1.x
header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable');

}
// and then for human consumption...

/* --------------------------------------------------------------
- This is the redirection /message for database failures -
- & customize to suit to my needs -
-------------------------------------------------------------- */

header("Location: http://yoururl.com");


echo '<html><body>';
...

==============

It's a trick I know =)