--- loncom/cgi/takeoffline.pl 2003/09/11 19:47:30 1.1 +++ loncom/cgi/takeoffline.pl 2003/09/11 20:54:11 1.2 @@ -1,7 +1,7 @@ #!/usr/bin/perl # Take machine offline, reroute traffic # -# $Id: takeoffline.pl,v 1.1 2003/09/11 19:47:30 www Exp $ +# $Id: takeoffline.pl,v 1.2 2003/09/11 20:54:11 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,10 +32,13 @@ unless ($ENV{'QUERY_STRING'}) { print 'No reroute server given, taking completely offline.'; &dead(); } else { - $otherserver=$ENV{'QUERY_STRING'}; + ($otherserver,$domain)=split(/\&/,$ENV{'QUERY_STRING'}); print 'Rerouting to '.$otherserver; &reroute(); } +open (STATUS,'>/home/httpd/html/lon-status/reroute.txt'); +print STATUS "status=rerouting&server=$otherserver&domain=$domain&time=".time."\n"; +close(STATUS); print ""; @@ -51,12 +54,12 @@ sub reroute { Welcome to the LearningOnline Network with CAPA - +

Connecting to -http://$otherserver/

+http://$otherserver/

ENDNEWINDEX