From f4c1cebfd0b008389355375bf53e9e668c209252 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Fri, 17 May 2024 11:24:52 +0400 Subject: [PATCH] Update cron script to use json. --- contrib/cron-based_noadmin/cron_gather_smart.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/cron-based_noadmin/cron_gather_smart.sh b/contrib/cron-based_noadmin/cron_gather_smart.sh index 78ad03f..a00a232 100755 --- a/contrib/cron-based_noadmin/cron_gather_smart.sh +++ b/contrib/cron-based_noadmin/cron_gather_smart.sh @@ -2,8 +2,8 @@ ############################################################################### # License: BSD Zero Clause License file # Copyright: -# (C) 2008 - 2022 Alex Butcher -# (C) 2008 - 2022 Alexander Shaduri +# (C) 2008 - 2024 Alex Butcher +# (C) 2008 - 2024 Alexander Shaduri ############################################################################### 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"