From 270e7d273b7acd59355f8d2424da4a277a969e8b Mon Sep 17 00:00:00 2001 From: jerry048 Date: Mon, 27 Feb 2023 02:52:24 +0800 Subject: [PATCH] Update qBittorrent_install.sh --- Torrent Clients/qBittorrent/qBittorrent_install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Torrent Clients/qBittorrent/qBittorrent_install.sh b/Torrent Clients/qBittorrent/qBittorrent_install.sh index 5d5eeb8..b940a75 100644 --- a/Torrent Clients/qBittorrent/qBittorrent_install.sh +++ b/Torrent Clients/qBittorrent/qBittorrent_install.sh @@ -67,7 +67,8 @@ EOF function qBittorrent_config { ## Determine if it is a SSD or a HDD and tune certain parameters - disktype=$(cat /sys/block/sda/queue/rotational) + disk_name=$(printf $(lsblk | grep -m1 'disk' | awk '{print $1}')) + disktype=$(cat /sys/block/$disk_name/queue/rotational) if [ "${disktype}" == 0 ]; then aio=12 low_buffer=5120