From 76b45c8bbc939588f6189b4d1dee6522c4ff2386 Mon Sep 17 00:00:00 2001 From: "Keith T. Garner" Date: Tue, 18 May 2021 07:53:05 -0500 Subject: bluld: add new package Signed-off-by: Keith T. Garner --- utils/bluld/files/bluld.conf | 3 +++ utils/bluld/files/bluld.init | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 utils/bluld/files/bluld.conf create mode 100755 utils/bluld/files/bluld.init (limited to 'utils/bluld/files') 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 +} -- cgit v1.2.3