mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-24 21:05:38 +00:00
Update cron script to use json.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user