system-scripts/sleephdd.sh

8 lines
214 B
Bash
Executable File

# 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