aboutsummaryrefslogtreecommitdiff
path: root/utils/uledd/files
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-10-19 14:46:06 +0200
committerJohn Crispin <john@phrozen.org>2017-10-19 16:37:32 +0200
commit282432de33d193c3835e56226afda7218af3f791 (patch)
tree3d815faa555d0d73ceb30df9a5b8a235d7ab4ae3 /utils/uledd/files
parent9b9ef2375d46e5f2eefafe00cd188764287257c4 (diff)
uledd: add a tiny ubus frontend for PWM/RGB leds
This daemon allows users to control PWM driven RGB LEDs using ubus. Currently it is possible to make leds blink at different brightnesses and or make them fade in between colours. the following call will turn green on and red off: ubus call led set '{ "leds": { "ap:green:status": 255, "ap:red:status": 0 } }' the following call will make green and red fade on/off over 2 seconds: ubus call led set '{ "leds": { "ap:green:status": [0, 255], "ap:red:status": [255, 0] }, "on": 2000, "off": 2000, "fade": 1 }' Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'utils/uledd/files')
-rw-r--r--utils/uledd/files/uledd.init13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/uledd/files/uledd.init b/utils/uledd/files/uledd.init
new file mode 100644
index 000000000..b1792677c
--- /dev/null
+++ b/utils/uledd/files/uledd.init
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=95
+
+USE_PROCD=1
+PROG=/sbin/uledd
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_set_param respawn
+ procd_close_instance
+}