Commit 593b3e6e authored by Leigh B Stoller's avatar Leigh B Stoller

Gracefully restart the apache geni FCGID server, where appropriate.

parent 3ead4566
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# Copyright (c) 2010-2016 University of Utah and the Flux Group. # Copyright (c) 2010-2017 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -48,6 +48,8 @@ my $TBOPS = "@TBOPSEMAIL@"; ...@@ -48,6 +48,8 @@ my $TBOPS = "@TBOPSEMAIL@";
my $SETSITEVAR = "$TB/sbin/setsitevar"; my $SETSITEVAR = "$TB/sbin/setsitevar";
my $STARTUP = "/usr/local/etc/rc.d/3.testbed.sh"; my $STARTUP = "/usr/local/etc/rc.d/3.testbed.sh";
my $MFRISBEED = "/usr/local/etc/rc.d/3.mfrisbeed.sh"; my $MFRISBEED = "/usr/local/etc/rc.d/3.mfrisbeed.sh";
my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $APACHE_START = "@APACHE_START_COMMAND@";
# Protos # Protos
sub Fatal($); sub Fatal($);
...@@ -125,6 +127,12 @@ sub Restart() ...@@ -125,6 +127,12 @@ sub Restart()
if ($?) { if ($?) {
Fatal("Could not clear general/testbed_shutdown"); Fatal("Could not clear general/testbed_shutdown");
} }
if ($PGENISUPPORT &&
!system("grep -q FCGID /etc/rc.conf")) {
if (system("$APACHE_START graceful geni")) {
Fatal("Could not restart apache geni server; swapping is disabled");
}
}
if ($noenable) { if ($noenable) {
print "Leaving the web interface disabled as directed.\n"; print "Leaving the web interface disabled as directed.\n";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment