miskcoo / ugreen_leds_controller

An LED Controller for UGREEN's DX/DXP NAS Series
180 stars 26 forks source link

Improve the disk standby check #40

Closed miskcoo closed 3 weeks ago

miskcoo commented 3 weeks ago

Like #38, this PR improves the standby check in #37. It will check whether the disk is in the standby mode every 1s by default and change the LED color accordingly.

To enable it, you should do the following things:

# compile the disk standby checker
g++ -std=c++17 -O2 check-standby.cpp -o ugreen-check-standby

# copy the binary file (the path can be changed, see STANDBY_MON_PATH in ugreen-leds.conf)
cp ugreen-check-standby /usr/bin

# copy the new script and restart the service
cp scripts/ugreen-diskiomon /usr/bin
systemctl restart ugreen-diskiomon

Minor changes:

Related issue: #21.

miskcoo commented 3 weeks ago

Hi @gulikoza, can you check whether the new SPEC is correct?

gulikoza commented 3 weeks ago

Hi,

RPM builds successfully and ugreen-check-standby is included. I suppose the second smartctl check also be removed?

miskcoo commented 3 weeks ago

You are right. I removed it.