gluon/package/gluon-core/files/usr/bin/gluon-blink
Maciej Krüger ef96b0b177
gluon-blink: add command to make the current device's status led blink
This allows a user to find out which device he's connected to by running
gluon-blink

The command will trigger a fast-blinnk on the status led
2022-03-05 23:48:57 +01:00

21 lines
285 B
Bash
Executable File

#!/bin/sh
# Makes your current device blink
. /etc/diag.sh
start() {
set_led_state preinit
}
stop() {
status_led_off
}
trap stop EXIT SIGTERM SIGINT
start
echo "Blinking on $(pretty-hostname) ($(cat /lib/gluon/core/sysconfig/primary_mac)) ... (ctrl-c to stop)"
sleep infinity