From bd28c2752ea11869bd590fd4d063d2fdb49b323c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 17 Feb 2022 20:48:00 +0100 Subject: [PATCH] - lcd4linux: allow screenshots w/o display --- package/lcd4linux/files-skel/etc/init.d/lcd4linux | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/lcd4linux/files-skel/etc/init.d/lcd4linux b/package/lcd4linux/files-skel/etc/init.d/lcd4linux index cd5bff1e..54d132d1 100755 --- a/package/lcd4linux/files-skel/etc/init.d/lcd4linux +++ b/package/lcd4linux/files-skel/etc/init.d/lcd4linux @@ -3,7 +3,6 @@ lcd4linux=$(which lcd4linux || type -p lcd4linux) [ -n $lcd4linux ] || exit 1 -[ -e /tmp/.lcd-* ] || exit 1 . /etc/init.d/functions . /etc/init.d/globals @@ -29,10 +28,17 @@ lcd4linux_png=/tmp/lcd4linux.png doStart() { ( # do always run in background - while [ ! -e /tmp/.lcd4linux ]; do sleep 2; done + # /tmp/.lcd4linux gets created by neutrino when lcd4l-Thread is ready + while [ ! -e /tmp/.lcd4linux ]; do + sleep 1; + done lcd4linux_conf=$(lcd4linux_conf) - $lcd4linux -f $lcd4linux_conf -p $lcd4linux_pid + + # /tmp/.lcd-* gets created by extdisplay script when a display was found + if [ -e /tmp/.lcd-* ]; then + $lcd4linux -f $lcd4linux_conf -p $lcd4linux_pid + fi if [ "$(get_setting lcd4l_screenshots)" == "1" ]; then cp $lcd4linux_conf $lcd4image_conf