From e1a575ba6ec84494ea894976c043812a8d6a374c Mon Sep 17 00:00:00 2001 From: denes Date: Sun, 22 Jul 2018 17:36:40 +0200 Subject: [PATCH] Using BATTERY_STATUS_LED_DEV from systemd if available --- battery_status_led.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/battery_status_led.sh b/battery_status_led.sh index 3dd7680..e59cb03 100755 --- a/battery_status_led.sh +++ b/battery_status_led.sh @@ -24,7 +24,8 @@ CRIT=5 # flip led every 0.5s BAT_FULL=`cat /sys/class/power_supply/BAT0/energy_full_design` CAPSLOCK_LED=`cat /sys/class/leds/input4\:\:capslock/brightness` -LED_DEV=/sys/class/leds/input4\:\:capslock/brightness +# If not set by the systemd service file +LED_DEV=${BATTERY_STATUS_LED_DEV:-/sys/class/leds/input4\:\:capslock/brightness} CNT=0