From cef9aba021ef4b7a8d1438e94a3d18c6c407e726 Mon Sep 17 00:00:00 2001 From: dragon28 Date: Sat, 29 Jun 2002 00:43:00 +0000 Subject: [PATCH] fixed script to handle mysqldump not being in the path, also fixed a typo --- koha.upgrade | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/koha.upgrade b/koha.upgrade index 1f21577d5d..2912dd5b0f 100644 --- a/koha.upgrade +++ b/koha.upgrade @@ -1,6 +1,5 @@ #!/usr/bin/perl -w - my %configfile; open (KC, "/etc/koha.conf"); while () { @@ -87,13 +86,28 @@ chmod 0770, $backupdir; # Backup MySql database # # +my $mysql; +my $mysqldir; + +foreach my $mysql (qw(/usr/local/mysql + /opt/mysql + )) { + if ( -d $mysql ) { + $mysqldir=$mysql; + } +} +if (!$mysqldir){ + $mysqldir='/usr'; +} + + my ($sec, $min, $hr, $day, $month, $year) = (localtime(time))[0,1,2,3,4,5]; $month++; $year+=1900; my $date= sprintf "%4d-%02d-%02d_%02d:%02d:%02d", $year, $month, $day,$hr,$min,$sec; -open (MD, "mysqldump --user=$user --password=$pass --host=$host $database|"); +open (MD, "$mysqldir/bin/mysqldump --user=$user --password=$pass --host=$host $database|"); open BF, ">$backupdir/Koha.backup_$date"; @@ -306,12 +320,12 @@ configuration to point it to the new files. In your INTRANET VirtualHost section you should have: DocumentRoot $intranetdir/htdocs - ScriptAlias /cgi-bin/koha/ $intranetroot/cgi-bin/ + ScriptAlias /cgi-bin/koha/ $intranetdir/cgi-bin/ SetEnv PERL5LIB $intranetdir/modules In the OPAC VirtualHost section you should have: DocumentRoot $opacdir/htdocs - ScriptAlias /cgi-bin/koha/ $opacroot/cgi-bin/ + ScriptAlias /cgi-bin/koha/ $opacdir/cgi-bin/ SetEnv PERL5LIB $intranetdir/modules You may also need to uncomment a "LoadModules env_module ... " line and restart -- 2.39.5