Update cron script to use json.

This commit is contained in:
Alexander Shaduri
2024-05-17 11:24:52 +04:00
parent 7cef499e67
commit f4c1cebfd0
@@ -2,8 +2,8 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2008 - 2022 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2022 Alexander Shaduri <ashaduri@gmail.com>
# (C) 2008 - 2024 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2024 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
device="$1";
@@ -17,6 +17,6 @@ dev_base=$(basename "$device")
out_file=/var/run/smart-"$dev_base"
# Change the path to smartctl if necessary.
smartctl -x "$device" > "$out_file" 2>&1
smartctl -x --json=o "$device" > "$out_file" 2>&1
chmod 644 "$out_file"