add smart status code
This commit is contained in:
parent
c52020a775
commit
28d7ee5336
|
@ -4,3 +4,7 @@ get_smart() {
|
|||
smartctl -H "$1"
|
||||
}
|
||||
|
||||
get_smart_status() {
|
||||
smartctl -H "$1" 2>/dev/null >/dev/null
|
||||
echo $?
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
for device in $SMART_DEVICES; do
|
||||
export device
|
||||
export result="$(get_smart "$device")"
|
||||
export status="$(get_smart_status "$device")"
|
||||
|
||||
render_template smart
|
||||
done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
S.M.A.R.T ${device}
|
||||
S.M.A.R.T ${device} (status: ${status})
|
||||
------------------------
|
||||
|
||||
${result}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="title">
|
||||
S.M.A.R.T ${device}
|
||||
S.M.A.R.T ${device} (status: ${status})
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
|
Loading…
Reference in New Issue