lcd4linux: switch service to procd 14190/head
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 10 Dec 2020 14:51:27 +0000 (15:51 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 10 Dec 2020 15:10:17 +0000 (16:10 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
utils/lcd4linux/Makefile
utils/lcd4linux/files/lcd4linux.init

index 165958ea1afaafaaa59f5aaca97b219d7568023d..20eac0748af9db77f5fe429ec6d32cc96b3a3253 100644 (file)
@@ -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
index 25033f382bf92cee8f66d52aede99bf3bbd89be9..a5e6a9db45340bcaa82fc90ae437fc02f27c5722 100644 (file)
@@ -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
-}
-