From 55ea0bc4a70515b6ef17c4487c587857f5ea663d Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 17 May 2021 22:53:23 +0200 Subject: [PATCH] memory.cgi: Use perl mechanism to check if the rrd file for the swap exists. Signed-off-by: Stefan Schantl --- html/cgi-bin/memory.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/memory.cgi b/html/cgi-bin/memory.cgi index 204365294e..214f18059f 100644 --- a/html/cgi-bin/memory.cgi +++ b/html/cgi-bin/memory.cgi @@ -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(); -- 2.39.5