Files
msm8916-openwrt/packages/ledcontrol/files/99-modem-led
T

17 lines
448 B
Bash

#!/bin/sh
# /etc/hotplug.d/iface/99-modem-led
# Modem LED control based on interface status
case "$ACTION:$INTERFACE" in
ifup:modem)
ledcontrol wan red off 2>/dev/null || true
ledcontrol wan on
logger -t modem-led "Modem UP - Green LED ON"
;;
ifdown:modem)
ledcontrol wan red on 2>/dev/null || true
ledcontrol wan off
logger -t modem-led "Modem DOWN - Green LED OFF"
;;
esac