From: Lars Wirzenius Date: Tue, 25 May 2010 01:44:15 +0000 (+1200) Subject: Add koha-disable, a script to disable a Koha instance. X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=0a3b9856dabb7b92a7e640832c2e1004dd27a68d;p=koha.git Add koha-disable, a script to disable a Koha instance. Signed-off-by: Galen Charlton --- diff --git a/debian/koha-common.install b/debian/koha-common.install index 9a586bc727..a4e3b7f331 100644 --- a/debian/koha-common.install +++ b/debian/koha-common.install @@ -1,6 +1,8 @@ -misc/release_notes/release_notes_3*.txt usr/share/doc/koha-common +misc/release_notes/release_notes_3*.txt usr/share/doc/koha-common debian/tmp/usr/* usr debian/tmp/etc/koha/pazpar2 debian/tmp/etc/koha/zebradb/[!z]* debian/templates/* etc/koha debian/koha-post-install-setup usr/sbin +debian/unavailable.html usr/share/koha/intranet/htdocs +debian/unavailable.html usr/share/koha/opac/htdocs diff --git a/debian/scripts/koha-disable b/debian/scripts/koha-disable new file mode 100755 index 0000000000..5d7aa3661d --- /dev/null +++ b/debian/scripts/koha-disable @@ -0,0 +1,39 @@ +#!/bin/sh +# +# koha-disable -- disable a Koha instance. +# Copyright 2010 Catalyst IT, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +set -e + + +die() { + echo "$@" 1>&2 + exit 1 +} + + +# Parse command line. +[ "$#" = 1 ] || die "Usage: $0 instancename..." + + +for name in "$@" +do + sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-disable.conf\)$:\1:' \ + "/etc/apache2/sites-available/$name" +done + +/etc/init.d/apache2 restart diff --git a/debian/unavailable.html b/debian/unavailable.html new file mode 100644 index 0000000000..50c57f3ce6 --- /dev/null +++ b/debian/unavailable.html @@ -0,0 +1,19 @@ + + + + +Unavailable + + + +

Sorry!

+ +

The Koha site you are trying to access is currently unavailable, +probably because of maintenance. +This is not at all your fault, and we apologize for any inconvenience +the downtime may cause you. Please check back in a while. +We hope to get things back up soon.

+ + +