Files
mars-smart/root/cgi-bin/listconfig.in
2026-04-21 02:12:28 +02:00

60 lines
1.5 KiB
Bash

#!/bin/sh
#
# List configuration file
#
# Copyright 2000 Wilmer van der Gaast (lintux@lintux.cx)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
. $WEBSERVE_ROOT/smart.conf # $MARS_CONFIG
if [ "$1" != "detached" ]; then
$0 detached < $MARS_CONFIG
exit;
fi
cat << EOF
Content-Type: text/html
<HTML>
<HEAD>
<TITLE>MARS_NWE configuration file</TITLE>
</HEAD>
<BODY BGCOLOR=#C0C0C0>
<TABLE BORDER>
<TR>
<TH BGCOLOR=$HEADER_BACK ALIGN=LEFT>
<TABLE BORDER=0 FRAME=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD><IMG SRC="/smart_icon.jpg"></TD>
<TD><FONT COLOR=$HEADER_BACK>-</FONT></TD>
<TH><FONT COLOR=$HEADER_FORE>nwserv.conf</FONT></TH>
</TR>
</TABLE>
<TR>
<TD>
<PRE>
<FONT COLOR=#00007F>
EOF
sed -e "s/\#.*/\<FONT COLOR=\#007F00\>&\<\/FONT\>/g" -e "s/^[ ]*[0123456789]\+[ ]\+/\<FONT COLOR=\#CF0000\>&\<\/FONT\>/g"
cat << EOF
</TABLE>
</FONT>
</PRE>
</BODY>
</HTML>
EOF