[webmin-devel] Block of code
Emma wasanzy <[email protected]> Mon, 18 Mar 2013 20:20:33 +0000
| Newsgroups | gmane.comp.web.webmin.devel,gmane.comp.web.webmin.general |
|---|---|
| Message-ID | <CALgYh1FYpe789s-9ebDWh3-ufMfHFnYwpDFrvdO=ruPDrudvMw@mail.gmail.com> |
--===============0963118548661271297==
Content-Type: multipart/alternative; boundary=20cf3071ca04c4fc3c04d838b934
--20cf3071ca04c4fc3c04d838b934
Content-Type: text/plain; charset=ISO-8859-1
Hello,
Can anyone tell me what the problem with this part of code. Is part of the
webmin module am writing for tomcat.
if ( $instance eq "tomcat5" ){
if ( $log_type eq "catalina.out") {
if ( $num_day eq "current" ) {
$tomcat_log = "/var/log/tomcat5/catalina.out";
}
else {
$tomcat_log = "/var/log/tomcat5/catalina.out-$day.gz";
}
}
elsif ( $log_type eq "access_log" ) {
if ( $num_day eq "current") {
$tomcat_log =
"/var/log/tomcat5/access-logs/tomcat_access.log-$current";
}
else {
$tomcat_log =
"/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz";
}
}
}
else {
if ( $log_type eq "catalina.out" ) {
if ( $num_day eq "current" ) {
$tomcat_log = "/var/lib/$instance/logs/catalina.out";
}
else {
$tomcat_log = "/var/lib/$instance/logs/catalina.out-$day.gz";
}
}
elsif ($log_type eq "access_log" ) {
if ( $num_day eq "current") {
$tomcat_log =
"/var/lib/$instance/access-logs/tomcat_access.log-$current";
}
else {
$tomcat_log =
"/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz";
}
}
}
--20cf3071ca04c4fc3c04d838b934
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hello,=A0<div><br></div><div style>Can anyone tell me what=
the problem with this part of code. Is part of the webmin module am writin=
g for tomcat.=A0</div><div style><br></div><div style><br></div><div style>=
<div>
if ( $instance eq "tomcat5" ){</div><div>=A0 =A0 if ( $log_type e=
q "catalina.out") {</div><div>=A0 =A0 =A0 =A0 if ( $num_day eq &q=
uot;current" ) {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D &qu=
ot;/var/log/tomcat5/catalina.out";</div>
<div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 =A0 =A0 else {</div><div>=A0 =A0 =
=A0 =A0 =A0 =A0 $tomcat_log =3D "/var/log/tomcat5/catalina.out-$day.gz=
";</div><div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 }</div><div>=A0 =A0 e=
lsif ( $log_type eq "access_log" ) {</div>
<div>=A0 =A0 =A0 =A0 if ( $num_day eq "current") {</div><div>=A0 =
=A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/log/tomcat5/access-logs/tomc=
at_access.log-$current";</div><div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0=
=A0 =A0 else {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/va=
r/log/tomcat5/access-logs/tomcat_access.log-$inday.gz";</div>
<div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 }</div><div>}</div><div>else {</di=
v><div>=A0 =A0 if ( $log_type eq "catalina.out" ) {</div><div>=A0=
=A0 =A0 =A0 if ( $num_day eq "current" ) {</div><div>=A0 =A0 =A0=
=A0 =A0 =A0 $tomcat_log =3D "/var/lib/$instance/logs/catalina.out&quo=
t;;</div>
<div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 =A0 =A0 else {</div><div>=A0 =A0 =
=A0 =A0 =A0 =A0 $tomcat_log =3D "/var/lib/$instance/logs/catalina.out-=
$day.gz";</div><div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 }</div><div>=
=A0 =A0 elsif ($log_type eq "access_log" ) { =A0</div>
<div>=A0 =A0 =A0 =A0 if ( $num_day eq "current") {</div><div>=A0 =
=A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/lib/$instance/access-logs/to=
mcat_access.log-$current";</div><div>=A0 =A0 =A0 =A0 } =A0=A0</div><di=
v>=A0 =A0 =A0 =A0 else {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D =
"/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz";</di=
v>
<div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 }</div><div>}</div></div><div styl=
e><br></div><div style><br></div></div>
--20cf3071ca04c4fc3c04d838b934--
--===============0963118548661271297==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
--===============0963118548661271297==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
--===============0963118548661271297==--