system-scripts/sleephdd.sh

8 lines
214 B
Bash
Raw Normal View History

2023-04-30 16:35:30 +03:00
# would recommend using hd-idle over hdparm
SLEEPHDD_MOUNTPOINT="/mnt/backup"
SLEEPHDD_DEVICE="/dev/sdb"
! mountpoint -q "$SLEEPHDD_MOUNTPOINT" || sudo umount $SLEEPHDD_MOUNTPOINT
sudo hdparm -y $SLEEPHDD_DEVICE