From f78adee9de6fd9d0cfcd3736e3c25e8dd213a66c Mon Sep 17 00:00:00 2001 From: pidor Date: Mon, 5 Jun 2017 20:04:05 +0200 Subject: [PATCH] better documentation timing for projector on --- README.txt | 4 ++++ scripts/beamercontrol.sh | 2 +- scripts/lightcommander | 2 ++ scripts/lockbutton.sh.d/01doormessage | 3 +++ scripts/upd_status.sh.d/tweet | 6 +++--- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 7720150..9b1cd4b 100644 --- a/README.txt +++ b/README.txt @@ -18,9 +18,13 @@ sudo bash # all is installed under root apt-get install php5-curl # for twitter apt-get install git # for getting this apt-get install wiringpi # for the buttons and stuff +apt-get install gawk # raspian has mawk by default which lacks time functions tzselect +comment out the last 4 lines of rsyslogd.conf (for xconsole) +like explained here https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=122601 + cp -p systemfiles/sudoers.d/* /etc/sudoers.d/ mkdir /root/var # kinda important diff --git a/scripts/beamercontrol.sh b/scripts/beamercontrol.sh index 1864df4..75da647 100755 --- a/scripts/beamercontrol.sh +++ b/scripts/beamercontrol.sh @@ -48,7 +48,7 @@ function beameron() { if [ "$currstatus" = "off" ] then echo "Waiting for beamer to boot..." - sleep 15 + sleep 18 echo "... is now booted" return 0 fi diff --git a/scripts/lightcommander b/scripts/lightcommander index a04f6ea..9238abf 100755 --- a/scripts/lightcommander +++ b/scripts/lightcommander @@ -36,6 +36,8 @@ function dolight() { ;; receiver) sudo /root/pidor/scripts/beamercontrol.sh receiver "$2" ;; + stealth) sudo /root/pidor/scripts/stealth.sh + ;; # maindoor) sudo /root/pidor/scripts/opendoor.sh # ;; esac diff --git a/scripts/lockbutton.sh.d/01doormessage b/scripts/lockbutton.sh.d/01doormessage index 1f45821..111914f 100755 --- a/scripts/lockbutton.sh.d/01doormessage +++ b/scripts/lockbutton.sh.d/01doormessage @@ -8,6 +8,8 @@ then fi if [ "$1" = "pushed" ] then + oldvol="$(amixer get PCM |awk -F'[][]' '/: Playback.*%/{print $2}')" + amixer set PCM 5% aplay '/root/win/Windows XP Error.wav' sleep 1 aplay '/root/win/Windows XP Critical Stop.wav' @@ -16,5 +18,6 @@ then sleep 1 #espeak -s 120 -p 80 "I will tell you when I am finished." 2>/dev/null aplay '/root/win/Windows XP Logoff Sound.wav' + amixer set PCM "$oldvol" fi ) & diff --git a/scripts/upd_status.sh.d/tweet b/scripts/upd_status.sh.d/tweet index 709093c..8048201 100755 --- a/scripts/upd_status.sh.d/tweet +++ b/scripts/upd_status.sh.d/tweet @@ -15,7 +15,7 @@ $statusTag = '#statusUpdate'; // Set the messages to tweet when the status of the hackspace changes // %s is going to be replaced by the current time to avoid duplicate tweets on Twitter $messageOpen = "It's %s and we are open \o/ \ncome in and create something awesome =) \nhttps://Level2.lu/openingTimes"; -$messageClosed = "We just closed our doors at %s \n%sSee you very soon... \nhttps://Level2.lu/openingTimes"; +$messageClosed = "We just closed our doors at %s%s See you very soon... \nhttps://Level2.lu/openingTimes"; require_once('TwitterAPIExchange.php'); @@ -54,9 +54,9 @@ if ( $currentStatus != $previousStatus ) { $peopleMax=str_replace("\n", '', $peopleMax); file_put_contents("/var/cache/peoplecountermax","0"); if($peopleMax>8) { // only write this info if the place has been quite busy - $peopleMax="There were up to $peopleMax hackers today.\n"; + $peopleMax="\nThere were up to $peopleMax hackers today.\n"; } else { - $peopleMax=""; + $peopleMax=str_repeat('.',$peopleMax); } } else { $peopleMax="";