mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Add S.M.A.R.T. fail warning to index.cgi.
This commit is contained in:
11
html/cgi-bin/index.cgi
Executable file → Normal file
11
html/cgi-bin/index.cgi
Executable file → Normal file
@@ -417,6 +417,17 @@ foreach my $line (@df) {
|
||||
}
|
||||
}
|
||||
|
||||
# S.M.A.R.T. health warning
|
||||
my @files = `/bin/ls /var/run/smartctl_out_hddtemp-*`;
|
||||
foreach my $file (@files) {
|
||||
chomp ($file);
|
||||
my $disk=`echo $file | cut -d"-" -f2`;
|
||||
chomp ($disk);
|
||||
if (`/bin/grep "SAVE ALL DATA" $file`) {
|
||||
$warnmessage .= "$Lang::tr{'smartwarn1'} $disk $Lang::tr{'smartwarn2'}<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($warnmessage) {
|
||||
print "<tr><td align='center' bgcolor=$Header::colourred colspan='3'><font color='white'>$warnmessage</font></table>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user