home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl5 -w
- #
- # syntax-admin.cgi
- #
- # Copyright 1988-1996 Silicon Graphics, Inc.
- # All rights reserved.
- #
- # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- # the contents of this file may not be disclosed to third parties, copied or
- # duplicated in any form, in whole or in part, without the prior written
- # permission of Silicon Graphics, Inc.
- #
- # RESTRICTED RIGHTS LEGEND:
- # Use, duplication or disclosure by the Government is subject to restrictions
- # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- # rights reserved under the Copyright Laws of the United States.
- #
- # $Id: syntax-admin.frm,v 1.6 1997/04/17 23:39:50 shotes Exp $
-
- $file = "/opt/TAS/tn/totaladmin/W3/conf/httpd.conf";
- $admin_port = 7777;
- if (-e $file) {
- open(IN, "< $file");
- while(<IN>) {
- if ($_ =~ /^Port\s+([0-9]+)/) { $admin_port = $1; }
- }
- close(IN);
- }
-
- if (-e "/etc/rc2.d/S99totaladmin") {
- $url = "http://" . $ENV{'SERVER_NAME'} . ":" . $admin_port;
-
- print "Window-target: gateway_syntax\n";
- print "Content-type: text/html\n\n";
- print "<HTML><HEAD><TITLE>Syntax IPX/IP Gateway</TITLE>\n"
- . "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$url\">\n"
- . "</HEAD><BODY></BODY></HTML>\n";
-
- exit 0;
- } else {
- print "Content-type: text/html\n\n";
- print "<h2>Syntax IPX/IP Gateway Software not Installed</h2>"
- . "The necessary Syntax software is not installed on"
- . " this server machine. Please load the TAS and Igate images"
- . " from the WebFORCE CD.";
- }
-