From b7fabb2da65591827f5f1fa3588e05134d222e98 Mon Sep 17 00:00:00 2001 From: pidor Date: Mon, 20 Mar 2017 17:36:27 +0100 Subject: [PATCH] avoid turning projector on when booting install flask --- README.txt | 4 ++++ scripts/beamerdetect.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 7b7c85d..7720150 100644 --- a/README.txt +++ b/README.txt @@ -45,6 +45,7 @@ put discard (for fstrim) in fstab reboot +NO systemd: put this in /etc/inittab (see example in systemfiles/inittab) # pidor P0:2345:respawn:/root/pidor/scripts/lockbutton.sh @@ -53,6 +54,7 @@ P2:2345:respawn:/root/pidor/scripts/ws4beamer_status.py P3:2345:respawn:/root/pidor/scripts/peoplecounter-realtime.sh P4:2345:respawn:/root/pidor/scripts/caststatus.py +WITH systemd cd systemfiles/ cp -p systemd/system/* /etc/systemd/system/ systemctl enable lockbutton.service beamerdetect.service ws4beamer_status.service peoplecounter-realtime.service caststatus.service @@ -60,6 +62,8 @@ systemctl daemon-reload systemctl start lockbutton.service beamerdetect.service ws4beamer_status.service peoplecounter-realtime.service caststatus.service +# get beamer status on port 5042 +apt-get install python-flask put the beamer IP into beamerip.txt diff --git a/scripts/beamerdetect.sh b/scripts/beamerdetect.sh index 184d1bd..3d44ef6 100755 --- a/scripts/beamerdetect.sh +++ b/scripts/beamerdetect.sh @@ -79,7 +79,7 @@ do # logger -t "$(basename $0) $$" "source=$signalsource cast=$(cat /var/run/caststatus)" sleep 10 caststatus="$(cat /var/run/caststatus)" - if [ "$caststatus" != "Backdrop" ] && [ "$caststatus" != "None" ] && + if [ "$caststatus" != "Backdrop" ] && [ "$caststatus" != "None" ] && [ "$caststatus" != "" ] && ( [ "$signalsource" = "" ] || [ "$signalsource" = "00" ] || [ "$signalsource" = "02" ] )