######################################################################################## ## CHILIASP INSTALLATION SCRIPT (for linux distributions) ## ## This does the main part of the install of Chili!Soft ASP. ######################################################################################## %parameters; my $i = 0; foreach (@ARGV) { if (/\s*([^\s=]*)\s*=\s*(.*)/) { my $key = $1; my $value = $2; if ($value =~ /\"([^\"]*|\\\"*)\"/) { $parameters{$key} = $1; } else { $parameters{$key} = $value; } } else { # Unnamed arguments, use incremental naming scheme. $parameters{$i++} = $_; } } $execute_params = join(" ",map { "\"$_\"" } @ARGV); ($asphome,$os,$add_servers) = ($parameters{asphome},$parameters{os},$parameters{add_servers}); # the current Chili!Asp version $caspver = '3.5.01-slackware'; # The current version of the odbc drivers: $odbcver = '13'; # number of processes in cnfg file $maxprocesses_mp = 5; $maxprocesses_mt = 2; # The installed asp server directory (asp-[webserver]-[port] set in conf.pm) $aspserverdir = 'NA'; # The in-process status text $status_text = ""; # The database we installed samples to $samplesdatabase="skipped"; # misc parameters $asp_address = '127.0.0.1'; $lic_name = 'LICENSE.LIC'; # perl needs to be searched for and saved in a preceeding script. $perl = ""; if (-x "/usr/bin/perl") { $perl = "/usr/bin/perl"; } elsif (-x "/usr/local/bin/perl") { $perl = "/usr/local/bin/perl"; } elsif (-x "/opt/perl/bin/perl") { $perl = "/opt/perl/bin/perl"; } else { $perl = `/usr/bin/which perl`; } if ("$perl" eq "") { printf("\n"); printf("Setup could not find Perl on your machine. Perl must exist\n"); printf("for setup to continue.\n"); printf("\n"); printf("Make sure the perl program is installed and is in your path.\n"); exit(1); } ######################################################################################## ## PARAMETERS FOR CUSTOMIZING INSTALLATION ######################################################################################## $installed_db = "$asphome/installed_db"; $sqlnk_dir = "odbc/sqlnk"; $enable_bean = 1; $use_netscape = 0; $use_apache = 1; $use_apache_rpm = 0; $use_domino = 0; $commercial_databases = 0; $java_has_choice = 0; #$java_current_version_dirname = "jre1.2"; $java_current_version_dirname = "jrt117_v1a"; ######################################################################################## ## HELPER FUNCTIONS ######################################################################################## sub read_template { ($#_ == 0) || die "Invalid number of arguments in read_template."; my ($filename) = @_; my $pattern = join('|', keys %substitute); my $result = ""; if (open(TEMPLATE,"<$asphome/INSTALL/templates/$filename")) { while(