Files
HAddons/sambanas/rootfs/etc/s6-overlay/s6-rc.d/init-smartd/run
ai-dev 4957b52f3a test
2025-10-11 12:15:25 +02:00

15 lines
598 B
Plaintext

#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Prepare the SMART config for disks
# ==============================================================================
if ! bashio::config.false "enable_smart"; then
smartctl --scan-open | while read -r -a device; do
bashio::log.info "Enabling S.M.A.R.T for ${device[0]}"
smartctl --smart=on --offlineauto=on --saveauto=on --quietmode=errorsonly "${device[0]}" || true
done
else
bashio::log.info "SMART support disabled in config"
fi