Browse Source

knxd: use procd (refs #2233)

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Acked-by: Othmar Truniger <github@truniger.ch>

[Squashed patches from PR]

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
lilik-openwrt-22.03
Patrick Grimm 9 years ago
committed by Michael Heimpold
parent
commit
9d549c36b0
2 changed files with 23 additions and 9 deletions
  1. +1
    -1
      net/knxd/Makefile
  2. +22
    -8
      net/knxd/files/knxd.init

+ 1
- 1
net/knxd/Makefile View File

@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=knxd PKG_NAME:=knxd
PKG_VERSION=2016-01-01-$(PKG_SOURCE_VERSION) PKG_VERSION=2016-01-01-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/knxd/knxd.git PKG_SOURCE_URL:=https://github.com/knxd/knxd.git


+ 22
- 8
net/knxd/files/knxd.init View File

@ -5,15 +5,29 @@ START=98
STOP=20 STOP=20
NAME=knxd NAME=knxd
PROG=/usr/bin/$NAME PROG=/usr/bin/$NAME
USE_PROCD=1
start() {
local options url
config_load "$NAME"
config_get options args options ''
config_get url args url
service_start $PROG $options $url
start_service() {
local options url
config_load "$NAME"
config_get options args options ''
config_get url args url
procd_open_instance
procd_set_param command $PROG $options $url
procd_set_param respawn
procd_close_instance
} }
stop() {
service_stop $PROG
stop_service() {
killall knxd
}
reload_service()
{
restart
}
service_triggers()
{
procd_add_reload_trigger knxd
} }

Loading…
Cancel
Save