memory.cgi: Use perl mechanism to check if the rrd file for the swap exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-05-17 22:53:23 +02:00
committed by Michael Tremer
parent 2386d2eff7
commit 4353c57924

View File

@@ -56,7 +56,7 @@ if ( $querry[0] =~ "memory"){
&Graphs::makegraphbox("memory.cgi","memory","day");
&Header::closebox();
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap 2>/dev/null` ) {
if (-f $mainsettings{'RRDLOG'}/collectd/localhost/swap) {
&Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
&Graphs::makegraphbox("memory.cgi","swap","day");
&Header::closebox();