mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Avoid overridding smartctl
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
-Avoid overriding the smartctl command https://github.com/alexbelgium/hassio-addons/issues/1308
|
||||
|
||||
## v0.8.0-2 (17-03-2024)
|
||||
- Minor bugs fixed
|
||||
|
||||
|
||||
@@ -109,5 +109,5 @@
|
||||
"slug": "scrutiny",
|
||||
"udev": true,
|
||||
"url": "https://github.com/AnalogJ/scrutiny",
|
||||
"version": "v0.8.0-2"
|
||||
"version": "v0.8.0-3"
|
||||
}
|
||||
|
||||
@@ -57,30 +57,3 @@ case "$FREQUENCY" in
|
||||
sed -i "/customize the cron schedule/a export COLLECTOR_CRON_SCHEDULE=\"0 0 * * 0\"" /etc/cont-init.d/50-cron-config
|
||||
;;
|
||||
esac
|
||||
|
||||
############################
|
||||
# SMARTCTL COMMAND OPTIONS #
|
||||
############################
|
||||
|
||||
# Alignt with smartctl commands options
|
||||
if bashio::config.has_value "SMARTCTL_COMMAND_DEVICE_TYPE"; then
|
||||
device_type="$(bashio::config 'SMARTCTL_COMMAND_DEVICE_TYPE')"
|
||||
if ! bashio::config.has_value "SMARTCTL_MEGARAID_DISK_NUM"; then
|
||||
megaraid_disk_num="$(bashio::config 'SMARTCTL_MEGARAID_DISK_NUM')"
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
else
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user