Saturday, October 20, 2007

One Liner: Put a Gallery2 Website in Maintenance Mode

Use the following to put a Gallery2 website in "maintenance mode" (e.g. during nightly backups):

/usr/bin/replace "\$gallery->setConfig('mode.maintenance', false);" "\$gallery->setConfig('mode.maintenance', true);" -- <gallery2-root>/gallery2/config.php

where <gallery2-root> stands for the root directory of your Gallery2 website. The (rather handy) utility replace is part of the MySQL server package.

Use a similar one liner to get out of maintenance mode, but with false/true replaced with true/false, respectively.

No comments:

Post a Comment