Skip to content

Commit

Permalink
Merge pull request #4921 from IQSS/4913_be_noninteractive
Browse files Browse the repository at this point in the history
4913 be noninteractive
  • Loading branch information
kcondon authored Aug 6, 2018
2 parents 457fb40 + c132d2e commit 05199fc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
23 changes: 20 additions & 3 deletions scripts/installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,31 @@ sub setup {
$ENV{'WARFILE_LOCATION'} = $WARFILE_LOCATION;

#start-glassfish is a container name for OpenShift deployment
unless($ENV{"MY_POD_NAME"} eq "start-glassfish" || $ENV{"MY_POD_NAME"} eq "dataverse-glassfish-0") {
system("perl ./postgres-setup");
if ( exists($ENV{'MY_POD_NAME'}) )
{
# assume that the second postgres-setup call is sufficient outside OpenShift
# nope, it's not - both are necessary
unless($ENV{"MY_POD_NAME"} eq "start-glassfish" || $ENV{"MY_POD_NAME"} eq "dataverse-glassfish-0") {
system("perl ./postgres-setup");
}
}
else
{
system("perl ./postgres-setup");
}

print "Finished configuring postgres \n";

#Start and Setup Glassfish + Deploy war file
system("perl ./glassfish-startup");
#needs to pass on -y / $yes for non-interactive
unless ($yes)
{
system("perl ./glassfish-startup");
}
else
{
system("perl ./glassfish-startup -y");
}

print "Finished configuring postgres \n";

Expand Down
7 changes: 5 additions & 2 deletions scripts/installer/postgres-setup
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ my $jq_exec = "";
my $pg_major_version = 0;
my $pg_minor_version = 0;
my $pod_name = "";
$pod_name = $ENV{'MY_POD_NAME'};
if (exists($ENV{'MY_POD_NAME'}))
{
$pod_name = $ENV{'MY_POD_NAME'};
}


##Handling container env
Expand Down Expand Up @@ -511,4 +514,4 @@ sub create_pg_hash {
exit 1;
}
return $hash;
}
}

0 comments on commit 05199fc

Please sign in to comment.