|
From: Matt D. <md...@us...> - 2004-05-27 00:04:18
|
Update of /cvsroot/acd/acd-1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26227 Modified Files: cvs_install Log Message: Added some intelligence when trying to find apache and mysql. -MD Index: cvs_install =================================================================== RCS file: /cvsroot/acd/acd-1/cvs_install,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cvs_install 26 Mar 2003 01:14:41 -0000 1.3 --- cvs_install 27 May 2004 00:04:07 -0000 1.4 *************** *** 57,90 **** # predefine some standard locations my $answer ; ! my $apache="/usr/local/bin/httpd"; ! my $mysql="/usr/bin/mysql"; ! #my $apache="/opt/apache/bin/httpd"; ! #my $mysql="/opt/mysql/bin/mysql"; my $file_mode=0755; my $dbrootpw=""; my $acd_prefix="/usr/local/acd"; - print "\nPath to httpd? [$apache] : "; - $answer=<STDIN>; - if(not $answer =~ m/^\s$/) { - chomp($answer); - $apache=$answer; - } - if(-x $apache) { - print "$apache present and executable, good\n"; - } else { - print "$apache not here, do more stuff\n"; - } ! print "Path to mysql? [$mysql] :"; ! $answer=<STDIN>; ! if(not $answer =~ m/^\s$/) { ! chomp $answer; ! $mysql=$answer; } ! if(-x $mysql) { ! print "$mysql present and executable, good\n"; ! } else { ! print "$mysql does not exist, do more stuff\n"; } print "Prefix to install ACD server? [$acd_prefix] :"; --- 57,119 ---- # predefine some standard locations my $answer ; ! my $apache_default="/usr/local/bin/httpd"; ! my $mysql_default="/usr/bin/mysql"; ! #my $apache_default="/opt/apache/bin/httpd"; ! #my $mysql_default="/opt/mysql/bin/mysql"; my $file_mode=0755; my $dbrootpw=""; my $acd_prefix="/usr/local/acd"; ! ! ### Let's try to find the webserver, or use a default. ! my $apache = `which httpd`; ! unless ( $apache ) {$apache = `which apache`}; ! unless ( $apache ) {$apache = '/usr/local/httpd/bin/httpd'}; ! chomp $apache; ! ! my $apache_found = 0; ! while ( !$apache_found ) { ! print "Path to httpd? [$apache] : "; ! $answer=<STDIN>; ! if( $answer !~ m/^\s$/) { ! chomp($answer); ! } else { ! $answer = $apache; ! } ! if(-x $answer) { ! print "$answer present and executable, good\n"; ! $apache_found = 1; ! } else { ! print "$answer is not present and executable, please try again\n"; ! } } ! $apache = $answer; ! ### Ok, we should have a webserver now. ! ! ### Let's try to find the database server, or use a default. ! my $mysql = `which mysql`; ! unless ( $mysql ) {$mysql = `which mysql`}; ! unless ( $mysql ) {$mysql = $mysql_default}; ! chomp $mysql; ! ! my $mysql_found = 0; ! while ( !$mysql_found ) { ! print "Path to mysql? [$mysql] : "; ! $answer=<STDIN>; ! if( $answer !~ m/^\s$/) { ! chomp($answer); ! } else { ! $answer = $mysql; ! } ! if(-x $answer) { ! print "$answer present and executable, good\n"; ! $mysql_found = 1; ! } else { ! print "$answer is not present and executable, please try again\n"; ! } } + $mysql = $answer; + ### Ok, we should have a database server now. + print "Prefix to install ACD server? [$acd_prefix] :"; |