koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] CVS: koha installer.pl,1.1,1.2


From: Pat Eyler
Subject: [Koha-devel] CVS: koha installer.pl,1.1,1.2
Date: Sat Apr 20 18:59:03 2002

Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv8717

Modified Files:
        installer.pl 
Log Message:
general cleanups


Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** installer.pl        17 Apr 2002 20:28:47 -0000      1.1
--- installer.pl        21 Apr 2002 01:58:26 -0000      1.2
***************
*** 1,54 ****
! #!perl 
  
! print "**********************************\n";
! print "* Welcome to the Koha Installer  *\n";
! print "**********************************\n";
! print "\n\n\n";
! print "This installer will prompt you with a series of questions.\n";
! print "It assumes you (or your system administrator) has installed: \n";
! print "  * Apache (http://www.apache.org) \n";
! print "  * Perl (http://www.perl.org) \n \n";
! print "and one of the following database applications:";
! print "  * MySql (http://www.mysql.org) \n\n";
! print "on some type of Unix or Unix-like operating system \n";
! print "\n\n";
! print "Is Apache, Perl, and a database from the list above installed on this 
system?\n";
! print "\n";
! $answer = chomp $_;                      
! if ($answer eq "Y") {
        print "Great!  \n";
    };
! if ($answer eq "N") {
!       print "You will need to setup database space for your application.  \n";
!       print "The installer currently does not support an automated setup with 
this database.\n";
!       print "Please be sure to read the documentation.";
!   };
  print "I need to unpack the Koha TarFile -- where is it?  ";
! $answer = chomp $_;    
  system("tar -x $answer"); #unpack fill out
  #test for Perl and Apache?
  print "Are you using MySql?[Y/N]: ";
! $answer = chomp $_;                      
! if ($answer eq "Y") {
        system("mysqladmin -uroot -ppassword create $KohaDBNAME ");
        system("mysql -u$root -p$password ");
        #need to get to mysql prompt  HOW DO I DO THIS?
        system("grant all privileges on Koha.* to address@hidden identified by 
'kohapassword'; ");
  
    };
  if ($answer eq "N") {
!       print "You will need to setup database space for your application.  \n";
!       print "The installer currently does not support an automated setup with 
this database.\n";
    };
  print "\n";
  system ("perl updatedatabase -I /pathtoC4 ");
  
  #KOHA conf
! print "You will need to add the following to the Koha configuration file\n";
! print "database=Koha\n";
! print "hostname=localhost\n";
! print "user=Koha\n";
! print "pass=$password\n";
! print "includes=/usr/local/www/koha/htdocs/includes\n";
  
  #SETUP opac
--- 1,92 ----
! #!/usr/bin/perl -w # please develop with -w
  
! use strict; # please develop with the strict pragma
! 
! print <<EOM;
! **********************************
! * Welcome to the Koha Installer  *
! **********************************
! 
! 
! 
! 
! This installer will prompt you with a series of questions.
! It assumes you (or your system administrator) has installed:
!   * Apache (http://www.apache.org)
!   * Perl (http://www.perl.org)
! 
! 
! and one of the following database applications:
!   * MySql (http://www.mysql.org)
! 
! 
! on some type of Unix or Unix-like operating system
! 
! 
! 
! Is Apache, Perl, and a database from the list above installed on this system?
! 
! EOM
! 
! my $answer = $_;                      
! chomp $answer;
! 
! if ($answer eq "Y" || $answer eq "y") {
        print "Great!  \n";
+     } else {
+     print <<EOM;
+ You will need to setup database space for your application.
+ The installer currently does not support an automated setup with this 
database.
+ Please be sure to read the documentation.
+ EOM
+     exit(1);
    };
! 
  print "I need to unpack the Koha TarFile -- where is it?  ";
! $answer = $_;
! chomp $answer;    
! 
! # FIXME?  using system is probably not the best way to do this 
! # tar on solaris may not work properly, etc.
  system("tar -x $answer"); #unpack fill out
+ 
+ 
  #test for Perl and Apache?
  print "Are you using MySql?[Y/N]: ";
! $answer = $_;                      
! chomp $answer
! if ($answer eq "Y") { 
        system("mysqladmin -uroot -ppassword create $KohaDBNAME ");
        system("mysql -u$root -p$password ");
        #need to get to mysql prompt  HOW DO I DO THIS?
+ 
+       # FIXME 
+       # you could pipe this into mysql in the shell that system generates
+       # can this be done from dbi?
        system("grant all privileges on Koha.* to address@hidden identified by 
'kohapassword'; ");
  
    };
  if ($answer eq "N") {
!     print <<EOM;
! You will need to use the MySQL database system for your application.
! The installer currently does not support an automated setup with this 
database.
! EOM
    };
+ 
  print "\n";
  system ("perl updatedatabase -I /pathtoC4 ");
  
  #KOHA conf
! # FIXME
! # is there a reason we don't just create the conf file here?
! 
! print <<EOM;
! You will need to add the following to the Koha configuration file\n";
! database=Koha\n";
! hostname=localhost\n";
! user=Koha\n";
! pass=$password\n";
! includes=/usr/local/www/koha/htdocs/includes\n";
! EOM
  
  #SETUP opac
***************
*** 63,65 ****
--- 101,107 ----
  
  ###RESTART APACHE
+ # FIXME
+ # this is a pretty rude thing to do on a system ...
+ # perhaps asking the user first would be better.
+ #
  system('/etc/rc.d/init.d/httpd restart');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]