Merge pull request #19476 from TDT-AG/pr/20220928-lcd4linux
lcd4linux: minor init improvments
This commit is contained in:
commit
90541e4a88
2 changed files with 18 additions and 3 deletions
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lcd4linux
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux
|
||||
|
|
|
@ -4,17 +4,32 @@
|
|||
START=98
|
||||
USE_PROCD=1
|
||||
|
||||
DEBUG=1
|
||||
PROG="/usr/bin/lcd4linux"
|
||||
CONFIGFILE="/etc/lcd4linux.conf"
|
||||
STATIC_CONFIG="/etc/lcd4linux.conf"
|
||||
DYNAMIC_CONFIG="/tmp/lcd4linux.conf"
|
||||
|
||||
start_service() {
|
||||
[ -f /etc/lcd4linux.conf ] || return 1
|
||||
if [ -f "$DYNAMIC_CONFIG" ]; then
|
||||
CONFIGFILE="$DYNAMIC_CONFIG"
|
||||
elif [ -f "$STATIC_CONFIG" ]; then
|
||||
CONFIGFILE="$STATIC_CONFIG"
|
||||
else
|
||||
echo "No config found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
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"
|
||||
[ "$DEBUG" = 1 ] && {
|
||||
procd_append_param command -vv
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
}
|
||||
procd_set_param file "$CONFIGFILE"
|
||||
procd_close_instance
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue