From e4abda513478aeb3d6d8f64202daa497555b1b88 Mon Sep 17 00:00:00 2001 From: Thord Johansson Date: Sun, 30 Apr 2023 15:35:30 +0200 Subject: [PATCH] Added HDD sleep helper for reference --- sleephdd.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 sleephdd.sh 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