- Implemented a battery-monitor service to track battery capacity and charging status, controlling LEDs accordingly. - Created a battery status page in LuCI to display voltage, status, health, and estimated capacity. - Added hotplug scripts to trigger battery status updates on power button presses and modem interface changes. - Developed LED control scripts for modem and WiFi status indicators. - Configured UCI defaults to enable WiFi and set up a modem interface with appropriate settings. - Introduced a utility script for LED control with various actions (on, off, blink). - Added a power button script for double-click shutdown functionality.
15 lines
359 B
Bash
15 lines
359 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 green:wan on
|
|
logger -t modem-led "Modem UP - Green LED ON"
|
|
;;
|
|
ifdown:modem)
|
|
ledcontrol green:wan off
|
|
logger -t modem-led "Modem DOWN - Green LED OFF"
|
|
;;
|
|
esac
|