-
-
Save csrutil/a4945d7c79ae97d1bb13c78a1cbc02c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/network/if-up.d | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# /sys/devices/platform/gpio-leds/leds | |
echo cpu > /sys/devices/platform/gpio-leds/leds/green\:sys/trigger | |
[ "$IFACE" != "lo" ] || exit 0 | |
if [ "$IFACE" = "eth0" ]; then | |
echo heartbeat > /sys/devices/platform/gpio-leds/leds/green\:lan/trigger | |
elif echo "$IFACE" | grep -q "enp"; then | |
echo heartbeat > /sys/devices/platform/gpio-leds/leds/green\:wan/trigger | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment