diff --git a/sleephdd.sh b/sleephdd.sh new file mode 100755 index 0000000..1b132ea --- /dev/null +++ b/sleephdd.sh @@ -0,0 +1,7 @@ +# 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