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