From 111b16ca1ff99b427e2654ba7d231e38db7b6d0e Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 10 Dec 2020 15:51:27 +0100 Subject: [PATCH] lcd4linux: switch service to procd Signed-off-by: Florian Eckert --- utils/lcd4linux/Makefile | 2 +- utils/lcd4linux/files/lcd4linux.init | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/utils/lcd4linux/Makefile b/utils/lcd4linux/Makefile index 165958ea1a..20eac0748a 100644 --- a/utils/lcd4linux/Makefile +++ b/utils/lcd4linux/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lcd4linux -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux diff --git a/utils/lcd4linux/files/lcd4linux.init b/utils/lcd4linux/files/lcd4linux.init index 25033f382b..a5e6a9db45 100644 --- a/utils/lcd4linux/files/lcd4linux.init +++ b/utils/lcd4linux/files/lcd4linux.init @@ -2,14 +2,19 @@ # Copyright (C) 2007-2015 OpenWrt.org START=98 +USE_PROCD=1 -SERVICE_USE_PID=1 +PROG="/usr/bin/lcd4linux" +CONFIGFILE="/etc/lcd4linux.conf" -start() { - service_start /usr/bin/lcd4linux -o /tmp/lcd4linux.png -q +start_service() { + [ -f /etc/lcd4linux.conf ] || return 1 + procd_open_instance + procd_set_param command "$PROG" + procd_append_param command -F + procd_append_param command -q + procd_append_param command -o /tmp/lcd4linux.png + procd_append_param command -f "$CONFIGFILE" + procd_set_param file "$CONFIGFILE" + procd_close_instance } - -stop() { - service_stop /usr/bin/lcd4linux -} -