system.service - take down for maintenance, unload module, load module

Hi - I was wondering if there was a set/get maintenance mode through the services module. Also, the ability to disable and enable modules?

Groups:
Login to post comments

Here is an untested

mrconnerton's picture
mrconnerton - Sat, 2009-05-30 20:36

Here is an untested theory:

First log in, or use user.login();

Then try possibly calling:
system.setVariable('site_offline',1);

As far as modules, I think a new service would have to be created to enable/disable them. Sounds fairly simple in theory. It could be as simple as flipping a switch in the mysql system table. But I'm not that advanced in drupal enough to know.

try the maintenance mode and let us know!

Matthew Connerton
http://www.mrconnerton.com