koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha installer.pl,1.2.2.17,1.2.2.18


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha installer.pl,1.2.2.17,1.2.2.18
Date: Fri, 21 Jun 2002 22:38:54 -0700

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

Modified Files:
      Tag: rel-1-2
        installer.pl 
Log Message:
Bug fixes.  More remaining.


Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.17
retrieving revision 1.2.2.18
diff -C2 -r1.2.2.17 -r1.2.2.18
*** installer.pl        21 Jun 2002 01:30:56 -0000      1.2.2.17
--- installer.pl        22 Jun 2002 05:38:52 -0000      1.2.2.18
***************
*** 82,86 ****
  print "\n";
  my $input;
! my $domainname = 'hostname -d';
  my $opacdir = '/usr/local/www/opac';
  my $kohadir = '/usr/local/www/koha';
--- 82,87 ----
  print "\n";
  my $input;
! my $domainname = `hostname -d`;
! chomp $domainname;
  my $opacdir = '/usr/local/www/opac';
  my $kohadir = '/usr/local/www/koha';
***************
*** 96,100 ****
  |;
  
! print "Enter directory: ";
  chomp($input = <STDIN>);
  
--- 97,101 ----
  |;
  
! print "Enter directory [$opacdir]: ";
  chomp($input = <STDIN>);
  
***************
*** 115,119 ****
  |;
  
! print "Enter directory: ";
  chomp($input = <STDIN>);
  
--- 116,120 ----
  |;
  
! print "Enter directory [$kohadir]: ";
  chomp($input = <STDIN>);
  
***************
*** 141,145 ****
  
  #Get the path to the koha.conf directory
! print "Enter the path to your [$etcdir]: ";
  chomp($input = <STDIN>);
  
--- 142,146 ----
  
  #Get the path to the koha.conf directory
! print "Enter the path to your configuration directory [$etcdir]: ";
  chomp($input = <STDIN>);
  
***************
*** 157,161 ****
  |;
  
! print "Enter database name:";
  chomp($input = <STDIN>);
  
--- 158,162 ----
  |;
  
! print "Enter database name [$dbname]: ";
  chomp($input = <STDIN>);
  
***************
*** 172,176 ****
  |;
  
! print "Enter hostname:";
  chomp($input = <STDIN>);
  
--- 173,177 ----
  |;
  
! print "Enter hostname [$hostname]: ";
  chomp($input = <STDIN>);
  
***************
*** 188,192 ****
  |;
  
! print "Enter username:";
  chomp($input = <STDIN>);
  
--- 189,193 ----
  |;
  
! print "Enter username [$user]:";
  chomp($input = <STDIN>);
  
***************
*** 254,264 ****
  #
  chown((getpwnam($httpduser)) [2,3], "$etcdir/koha.conf") or warn "can't chown 
koha.conf: $!";
  
  #
  #SETUP opac
  #
! my $svr_admin = 'address@hidden';
! my $opac_svr_name = 'opac.$domainname';
! my $koha_svr_name = 'koha.$domainname';
  
  print qq|
--- 255,266 ----
  #
  chown((getpwnam($httpduser)) [2,3], "$etcdir/koha.conf") or warn "can't chown 
koha.conf: $!";
+ chmod 0440, "$etcdir/koha.conf";
  
  #
  #SETUP opac
  #
! my $svr_admin = "address@hidden";
! my $opac_svr_name = "opac.$domainname";
! my $koha_svr_name = "koha.$domainname";
  
  print qq|
***************
*** 273,277 ****
  |;
  
! print "Enter e-mail address:";
  chomp($input = <STDIN>);
  
--- 275,279 ----
  |;
  
! print "Enter e-mail address [$svr_admin]:";
  chomp($input = <STDIN>);
  
***************
*** 286,290 ****
  Usually $opac_svr_name
  |;
! print "Enter servername address:";
  chomp($input = <STDIN>);
  
--- 288,292 ----
  Usually $opac_svr_name
  |;
! print "Enter servername address [$opac_svr_name]:";
  chomp($input = <STDIN>);
  
***************
*** 298,302 ****
  Usually $koha_svr_name
  |;
! print "Enter servername address:";
  chomp($input = <STDIN>);
  
--- 300,304 ----
  Usually $koha_svr_name
  |;
! print "Enter servername address [$koha_svr_name]:";
  chomp($input = <STDIN>);
  
***************
*** 315,320 ****
  
  |;
! open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open 
$realhttpdconf for writing.\n";
! print SITE <<EOP
  
  <VirtualHost $opac_svr_name>
--- 317,328 ----
  
  |;
! if (`grep 'VirtualHost $opac_svr_name' $realhttpdconf`) {
!     warn "$realhttpdconf appears to already have an entry for Koha\nVirtual 
Hosts.\n";
!     print "Press <ENTER> to continue...";
!     <STDIN>;
!     print "\n";
! } else {
!     open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open 
$realhttpdconf for writing.\n";
!     print SITE <<EOP
  
  <VirtualHost $opac_svr_name>
***************
*** 340,346 ****
  EOP
  ;
! close(SITE);
! print "Successfully updated Apache Configuration file.\n";
  
  
  #
--- 348,355 ----
  EOP
  ;
!     close(SITE);
!     print "Successfully updated Apache Configuration file.\n";
  
+ }
  
  #
***************
*** 354,357 ****
--- 363,370 ----
  |;
  
+ # Still need to check that all parent directories of $kohadir and $opacdir
+ # exist
+ 
+ 
  unless ( -d $kohadir ) {
     print "Creating $kohadir...\n";
***************
*** 449,453 ****
  
  #RESTART APACHE
! system('clear');
  print qq|
  COMPLETED
--- 462,467 ----
  
  #RESTART APACHE
! #system('clear');
! print "\n\n";
  print qq|
  COMPLETED
***************
*** 467,470 ****
--- 481,485 ----
  
  if ($answer eq "Y" || $answer eq "y") {
+       # Need to support other init structures here?
        system('/etc/rc.d/init.d/httpd restart');
      } else {




reply via email to

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