koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha Install.pm,1.1.2.4,1.1.2.5 installer.pl,1.2.2.63,1.


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha Install.pm,1.1.2.4,1.1.2.5 installer.pl,1.2.2.63,1.2.2.64
Date: Thu, 25 Jul 2002 11:07:34 -0700

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

Modified Files:
      Tag: rel-1-2
        Install.pm installer.pl 
Log Message:
Finished modularizing installer.pl


Index: Install.pm
===================================================================
RCS file: /cvsroot/koha/koha/Attic/Install.pm,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** Install.pm  25 Jul 2002 17:34:38 -0000      1.1.2.4
--- Install.pm  25 Jul 2002 18:07:32 -0000      1.1.2.5
***************
*** 22,25 ****
--- 22,26 ----
                &installfiles
                &databasesetup
+               &restartapache
                );
  
***************
*** 148,151 ****
--- 149,190 ----
  Koha Log Directory [%s]: |;
  
+ $messages->{'AuthenticationWarning'}->{en}=qq|
+ ==================
+ = Authentication =
+ ==================
+ 
+ This release of Koha has a new authentication module.  If you are not already
+ using basic authentication on your intranet, you will be required to log in to
+ access some of the features of the intranet.  You can log in using the userid
+ and password from the /etc/koha.conf configuration file at any time.  Use the
+ "Members" module to add passwords for other accounts and set their 
permissions.
+ 
+ [NOTE PERMISSIONS ARE NOT COMPLETED AS OF THIS RELEASE.  Do not give passwords
+ to any patrons unless you want them to have full access to your intranet.]
+ 
+ print "Press the <ENTER> key to continue: |;
+ 
+ $messages->{'Completed'}->{en}=qq|
+ ==============================
+ = KOHA INSTALLATION COMPLETE =
+ ==============================
+ 
+ Congratulations ... your Koha installation is complete!
+ 
+ You will be able to connect to your Librarian interface at:
+ 
+    http://%s\:%s/
+ 
+ and the OPAC interface at :
+ 
+    http://%s\:%s/
+ 
+ 
+ Be sure to read the INSTALL, and Hints files. 
+ 
+ For more information visit http://www.koha.org
+ 
+ Press <ENTER> to exit the installer: |;
+ 
  sub releasecandidatewarning {
      my $message=getmessage('ReleaseCandidateWarning', [$::kohaversion, 
$::kohaversion]);
***************
*** 931,934 ****
--- 970,980 ----
      chown((getpwnam($::httpduser)) [2,3], "$::etcdir/koha.conf") or warn 
"can't chown koha.conf: $!";
      chmod 0440, "$::etcdir/koha.conf";
+ 
+     chmod 0750, "$::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh";
+     chmod 0750, "$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh";
+     chmod 0750, "$::intranetdir/scripts/z3950daemon/processz3950queue";
+     chown(0, (getpwnam($::httpduser)) [3], 
"$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh") or warn "can't 
chown $::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh: $!";
+     chown(0, (getpwnam($::httpduser)) [3], 
"$::intranetdir/scripts/z3950daemon/processz3950queue") or warn "can't chown 
$::intranetdir/scripts/z3950daemon/processz3950queue: $!";
+ 
  }
  
***************
*** 1091,1094 ****
--- 1137,1168 ----
  
  
+     }
+ 
+ }
+ 
+ $messages->{'RestartApache'}->{en}=qq|
+ ==================
+ = RESTART APACHE =
+ ==================
+ 
+ Apache needs to be restarted to load the new configuration for Koha.
+ 
+ Would you like to restart Apache now?  [Y]/N: |;
+ 
+ sub restartapache {
+ 
+     my $response=showmessage(getmessage('RestartApache'), 'yn', 'y');
+ 
+ 
+ 
+     unless ($response=~/^n/i) {
+       # Need to support other init structures here?
+       if (-e "/etc/rc.d/init.d/httpd") {
+           system('/etc/rc.d/init.d/httpd restart');
+       } elsif (-e "/etc/init.d/apache") {
+           system('/etc//init.d/apache restart');
+       } elsif (-e "/etc/init.d/apache-ssl") {
+           system('/etc/init.d/apache-ssl restart');
+       }
      }
  

Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.63
retrieving revision 1.2.2.64
diff -C2 -r1.2.2.63 -r1.2.2.64
*** installer.pl        25 Jul 2002 17:34:38 -0000      1.2.2.63
--- installer.pl        25 Jul 2002 18:07:32 -0000      1.2.2.64
***************
*** 87,203 ****
  databasesetup();
  
  
! exit;
  
  
  
- # LAUNCH SCRIPT
- print "Modifying Z39.50 daemon launch script...\n";
- my $newfile='';
- open (L, "$::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh");
- while (<L>) {
-     if (/^RunAsUser=/) {
-       $newfile.="RunAsUser=$::httpduser\n";
-     } elsif (/^KohaZ3950Dir=/) {
-       $newfile.="KohaZ3950Dir=$::intranetdir/scripts/z3950daemon\n";
-     } else {
-       $newfile.=$_;
-     }
- }
- close L;
- system("mv $::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh 
$::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh.orig");
- open L, ">$::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh";
- print L $newfile;
- close L;
  
- 
- # SHELL SCRIPT
- print "Modifying Z39.50 daemon wrapper script...\n";
- $newfile='';
- open (S, "$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh");
- while (<S>) {
-     if (/^KohaModuleDir=/) {
-       $newfile.="KohaModuleDir=$::intranetdir/modules\n";
-     } elsif (/^KohaZ3950Dir=/) {
-       $newfile.="KohaZ3950Dir=$::intranetdir/scripts/z3950daemon\n";
-     } elsif (/^LogDir=/) {
-       $newfile.="LogDir=$::kohalogdir\n";
-     } else {
-       $newfile.=$_;
-     }
- }
- close S;
- 
- system("mv $::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh 
$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh.orig");
- open S, ">$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh";
- print S $newfile;
- close S;
- chmod 0750, "$::intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh";
- chmod 0750, "$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh";
- chmod 0750, "$::intranetdir/scripts/z3950daemon/processz3950queue";
- chown(0, (getpwnam($::httpduser)) [3], 
"$::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh") or warn "can't 
chown $::intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh: $!";
- chown(0, (getpwnam($::httpduser)) [3], 
"$::intranetdir/scripts/z3950daemon/processz3950queue") or warn "can't chown 
$::intranetdir/scripts/z3950daemon/processz3950queue: $!";
- 
- print qq|
- 
- ==================
- = Authentication =
- ==================
- 
- This release of Koha has a new authentication module.  If you are not already
- using basic authentication on your intranet, you will be required to log in to
- access some of the features of the intranet.  You can log in using the userid
- and password from the /etc/koha.conf configuration file at any time.  Use the
- "Members" module to add passwords for other accounts and set their 
permissions.
- 
- [NOTE PERMISSIONS ARE NOT COMPLETED AS OF 1.2.3RC1.  Do not give passwords to
-  any patrons unless you want them to have full access to your intranet.]
- |;
- print "Press the <ENTER> key to continue: ";
- <STDIN>;
- 
- 
- #RESTART APACHE
- print "\n\n";
- #print qq|
- #
- #COMPLETED
- #=========
- #Congratulations ... your Koha installation is almost complete!
- #The final step is to restart your webserver.
- #
- #You will be able to connect to your Librarian interface at:
- #
- #   http://$servername\:$kohaport/
- #
- #and the OPAC interface at :
- #
- #   http://$servername\:$opacport/
- #
- #
- #Be sure to read the INSTALL, and Hints files. 
- #
- #For more information visit http://www.koha.org
- #
- #Would you like to restart your webserver now? (Y/[N]):
- #|;
- 
- my $restart = <STDIN>;
- chomp $restart;
- 
- if ($restart=~/^y/i) {
-       # Need to support other init structures here?
-       if (-e "/etc/rc.d/init.d/httpd") {
-           system('/etc/rc.d/init.d/httpd restart');
-       } elsif (-e "/etc/init.d/apache") {
-           system('/etc//init.d/apache restart');
-       } elsif (-e "/etc/init.d/apache-ssl") {
-           system('/etc/init.d/apache-ssl restart');
-       }
-     } else {
-       print qq|
- Congratulations ... your Koha installation is complete!
- You will need to restart your webserver before using Koha!
- |;
-     exit;
- };
--- 87,96 ----
  databasesetup();
  
+ restartapache();
  
! showmessage(getmessage('AuthenticationWarning'), 'PressEnter');
  
  
+ showmessage(getmessage('Completed', [ $::servername, $::intranetport, 
$::servername, $::opacport]), 'PressEnter');
  
  




reply via email to

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