diff options
author | Keith T. Garner <kgarner@kgarner.com> | 2021-05-18 07:53:05 -0500 |
---|---|---|
committer | Polynomdivision <vincent@systemli.org> | 2021-06-01 21:11:03 +0200 |
commit | 76b45c8bbc939588f6189b4d1dee6522c4ff2386 (patch) | |
tree | d62654cf5bd4a68bde02e79caa1408fb91fb2596 /utils/bluld/files | |
parent | 888a2d2313c6962983cb2bb661043634833d0458 (diff) |
bluld: add new package
Signed-off-by: Keith T. Garner <kgarner@kgarner.com>
Diffstat (limited to 'utils/bluld/files')
-rw-r--r-- | utils/bluld/files/bluld.conf | 3 | ||||
-rwxr-xr-x | utils/bluld/files/bluld.init | 39 |
2 files changed, 42 insertions, 0 deletions
diff --git a/utils/bluld/files/bluld.conf b/utils/bluld/files/bluld.conf new file mode 100644 index 000000000..71c5944ec --- /dev/null +++ b/utils/bluld/files/bluld.conf @@ -0,0 +1,3 @@ +config bluld uleds + option led_count 1 + list colors 'green' diff --git a/utils/bluld/files/bluld.init b/utils/bluld/files/bluld.init new file mode 100755 index 000000000..288b44d2e --- /dev/null +++ b/utils/bluld/files/bluld.init @@ -0,0 +1,39 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2021 Keith T. Garner + +START=90 + +USE_PROCD=1 + +PROG=/usr/sbin/bluld + +start_service() { + config_load bluld + + local led_count + local colors + + config_get led_count uleds led_count + config_get colors uleds colors + + procd_open_instance + procd_set_param command $PROG $led_count $colors + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param nice 20 + procd_close_instance +} + +service_triggers() { + procd_add_reload_trigger "bluld" +} + +reload_service() { + stop + start + /etc/init.d/led restart +} + +restart() { + reload_service +} |