updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / koha / koha.install
blobb613d0096df0c26f970c08f2a8db64232c708194
1 post_install() {
2   
3   if ! getent group koha > /dev/null 2>&1; then
4     groupadd koha &> /dev/null
5   fi
7   if ! getent passwd koha > /dev/null 2>&1; then
8     useradd -g koha koha &> /dev/null
9   fi
12   echo "Koha files are installed, however there are a few more steps to perform"
13   echo
14   echo "Please create a mysql database named 'koha', and allow full access to user"
15   echo "'kohaadmin' with password 'katikoan'"
16   echo "You can do this by issuing the following command:"
17   echo "  \$ echo 'create database koha; grant all on koha.* to kohaadmin@localhost \\"
18   echo "     identified by '\''katikoan'\''; flush privileges;' | mysql -uroot -p"
19   echo
20   echo "In order to use Koha's command-line batch jobs,"
21   echo "you should set the following environment variables:"
22   echo
23   echo "export KOHA_CONF=/etc/koha/koha-conf.xml"
24   echo "export PERL5LIB=/usr/share/koha/lib"
25   echo
26   echo "Please consult the /usr/share/doc/koha-$1/INSTALL file on how to"
27   echo "complete the installation. Steps 1-4 were completed by this package, "
28   echo "you should continue at step 5"
32 post_upgrade() {
33   # handle upgrade from 3.2 to 3.4
34   if [ ${1:2:2} == 04 ] && [ ${2:2:2} == 02 ]; then
35     echo "Koha 3.4.x no longer stores items in biblio records so as part of the"
36     echo "upgrade we now run the following two steps, they can take a"
37     echo "long time (several hours) to complete for large databases"
38     echo
39     echo "/usr/share/koha/bin/maintenance/remove_items_from_biblioitems.pl --run"
40     echo "/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r"
41     echo
42     echo "Running /usr/share/koha/bin/maintenance/remove_items_from_biblioitems.pl --run"
43     export PERL5LIB=/usr/share/koha/lib
44     export KOHA_CONF=/etc/koha/koha-conf.xml
45     /usr/share/koha/bin/maintenance/remove_items_from_biblioitems.pl --run
46     echo "Done."
47     echo
48     echo "Running /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r"
49     /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r
50     echo "Done."
51     echo
52   fi
56 post_remove() {
57   userdel koha
58   groupdel koha
60   echo "If you have created a koha database, you might want to remove it now by running:"
61   echo "  \$ echo 'drop database koha;' | mysql -uroot -p"