You've already forked UGREEN-NAS-LED
Initialize Git Repository: 'UGREEN-NAS-LED'
UGREEN NAS / UGREEN NAS (amd64, cicd.trixie, trixie, main, x86_64-linux-gnu-g++-14) (push) Successful in 18s
UGREEN NAS / UGREEN NAS (amd64, cicd.trixie, trixie, main, x86_64-linux-gnu-g++-14) (push) Successful in 18s
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Options Section
|
||||
#
|
||||
###
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Variables Section
|
||||
#
|
||||
###
|
||||
|
||||
if [[ -f '/etc/ugreen-nas-led.conf' ]]; then
|
||||
source '/etc/ugreen-nas-led.conf'
|
||||
fi
|
||||
|
||||
POWER_LED_BLINK_PATTERN=${POWER_LED_BLINK_PATTERN:='none'}
|
||||
POWER_LED_BRIGHTNESS=${POWER_LED_BRIGHTNESS:='255'}
|
||||
POWER_LED_COLOR=${POWER_LED_COLOR:='255 255 255'}
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Runtime Environment
|
||||
#
|
||||
###
|
||||
|
||||
|
||||
if [[ -d '/sys/class/leds/power' ]]; then
|
||||
/usr/bin/echo "${POWER_LED_BLINK_PATTERN}" > '/sys/class/leds/power/blink_type'
|
||||
/usr/bin/echo "${POWER_LED_BRIGHTNESS}" > '/sys/class/leds/power/brightness'
|
||||
/usr/bin/echo "${POWER_LED_COLOR}" > '/sys/class/leds/power/color'
|
||||
fi
|
||||
Reference in New Issue
Block a user