mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
ledcontrol: fix disk number
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
c9c231e65e
commit
45fac6d694
@ -44,11 +44,12 @@ else
|
|||||||
${UGREEN_LEDS_CLI} power -on -color 255 255 255 -brightness 255 >/dev/null 2>&1
|
${UGREEN_LEDS_CLI} power -on -color 255 255 255 -brightness 255 >/dev/null 2>&1
|
||||||
|
|
||||||
# Disks
|
# Disks
|
||||||
devices=$(ls -d /dev/sata*[1-9] 2>/dev/null | grep -v 'p')
|
devices=$(($(ls -d /dev/sata*[1-9] 2>/dev/null | grep -v 'p' | wc -l) - 1))
|
||||||
disk_number=0
|
disk_number=0
|
||||||
for i in ${devices}; do
|
while true; do
|
||||||
disk_number=$((${disk_number} + 1)) # Disknummer für die LED-Steuerung (disk1, disk2, etc.)
|
disk_number=$((disk_number + 1))
|
||||||
${UGREEN_LEDS_CLI} disk${disk_number} -on -color 0 255 0 -brightness 255 >/dev/null 2>&1
|
${UGREEN_LEDS_CLI} disk${disk_number} -on -color 0 255 0 -brightness 255 >/dev/null 2>&1
|
||||||
|
[ ${disk_number} -eq ${devices} ] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user