Add koha-disable, a script to disable a Koha instance.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
01bd539cab
commit
71e585df2f
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Unavailable</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Sorry!</h1>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue