#!/bin/sh

# Load ipmodule variables
. /opt/gira/share/devicestack/ipmodule-vars

me="[$(printf $0 | xargs basename)]"

printf "${me} Resetting LEDs ... "
for LED in $(ls -1 /sys/class/leds)
do
  if [ $(echo ${LED} | grep -v 'mmc') ]; then
    printf "0\\n" > /sys/class/leds/${LED}/brightness
  fi
done
printf "${me} done.\\n"

# Set KNX Traffic LED on to prevent all LEDs are deaktivated for a longer time priod
# indicating the device is still alive
printf "1\\n" > /sys/class/leds/knx/brightness

exit 0
