From: Stefan Schantl Date: Mon, 17 May 2021 20:53:23 +0000 (+0200) Subject: memory.cgi: Use perl mechanism to check if the rrd file for the swap exists. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55ea0bc4a70515b6ef17c4487c587857f5ea663d;p=people%2Fstevee%2Fipfire-2.x.git memory.cgi: Use perl mechanism to check if the rrd file for the swap exists. Signed-off-by: Stefan Schantl --- 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();