From 53d02fe96ddd03cbe76820cee073179e501918dc Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sat, 6 Jul 2019 14:46:05 -0600 Subject: nc-hdd-monitor: fix detection Signed-off-by: nachoparker --- bin/ncp/SYSTEM/nc-hdd-monitor.sh | 24 ++++++++++++++---------- changelog.md | 6 ++++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/bin/ncp/SYSTEM/nc-hdd-monitor.sh b/bin/ncp/SYSTEM/nc-hdd-monitor.sh index e88efa3b..e4c0976a 100644 --- a/bin/ncp/SYSTEM/nc-hdd-monitor.sh +++ b/bin/ncp/SYSTEM/nc-hdd-monitor.sh @@ -24,17 +24,12 @@ configure() } [[ "$ACTIVE" != yes ]] && { - update-rc.d smartd disable - service smartd stop + systemctl disable smartd + service smartd stop echo "HDD monitor disabled" return 0 } - cat > /etc/smartd.conf < /usr/local/etc/ncp-hdd-notif.sh < /etc/smartd.conf </dev/null || { smartctl -d sat -i /dev/${dr} &>/dev/null && type="-d sat" } - smartctl $type --smart=on /dev/${dr} | sed 1,2d; + smartctl ${type} --smart=on /dev/${dr} | sed 1,2d; + + cat >> /etc/smartd.conf <