home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / gateway.idb / usr / WebFace / Source / 10-InfoSystems / syntax / syntax-admin.frm.z / syntax-admin.frm
Encoding:
Text File  |  1997-07-30  |  1.6 KB  |  49 lines

  1. #!/usr/bin/perl5 -w
  2. #
  3. # syntax-admin.cgi
  4. #
  5. # Copyright 1988-1996 Silicon Graphics, Inc.
  6. # All rights reserved.
  7. #
  8. # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  9. # the contents of this file may not be disclosed to third parties, copied or
  10. # duplicated in any form, in whole or in part, without the prior written
  11. # permission of Silicon Graphics, Inc.
  12. #
  13. # RESTRICTED RIGHTS LEGEND:
  14. # Use, duplication or disclosure by the Government is subject to restrictions
  15. # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  16. # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  17. # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  18. # rights reserved under the Copyright Laws of the United States.
  19. #
  20. # $Id: syntax-admin.frm,v 1.6 1997/04/17 23:39:50 shotes Exp $
  21.  
  22. $file = "/opt/TAS/tn/totaladmin/W3/conf/httpd.conf";
  23. $admin_port = 7777;
  24. if (-e $file) { 
  25.     open(IN, "< $file");
  26.     while(<IN>) {
  27.         if ($_ =~ /^Port\s+([0-9]+)/) { $admin_port = $1; }
  28.     }
  29.     close(IN);
  30. }
  31.  
  32. if (-e "/etc/rc2.d/S99totaladmin") {
  33.     $url = "http://" . $ENV{'SERVER_NAME'} . ":" . $admin_port;
  34.  
  35.     print "Window-target: gateway_syntax\n";
  36.     print "Content-type: text/html\n\n";
  37.     print "<HTML><HEAD><TITLE>Syntax IPX/IP Gateway</TITLE>\n"
  38.         . "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$url\">\n"
  39.         . "</HEAD><BODY></BODY></HTML>\n";
  40.  
  41.     exit 0;
  42. } else {
  43.     print "Content-type: text/html\n\n";
  44.     print "<h2>Syntax IPX/IP Gateway Software not Installed</h2>" 
  45.         . "The necessary Syntax software is not installed on"
  46.         . " this server machine.  Please load the TAS and Igate images"
  47.         . " from the WebFORCE CD.";
  48. }
  49.