Add static sound. Add predefined announcements and helper scripts.

This commit is contained in:
Dejvino
2021-01-09 14:19:15 +01:00
parent 059d555463
commit ccc5c82dba
11 changed files with 72 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
VOL=25
mplayer "http://us2.internet-radio.com:8443/;stream" -cache 1024 -cache-min 20 -volume $VOL -softvol -channels 2 -af pan=1:0.5:0.5
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
mosquitto_pub -t vault/psa/announcement -l
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
TIME=$1
shift
at "$TIME" <<EOT
cd ~/build/vault-announcer/bin
./announce-freeform "$@"
EOT
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
TIME=$1
shift
at "$TIME" <<EOT
cd ~/build/vault-announcer/bin
./emergency-freeform "$@"
EOT
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
function time_minus_minutes() {
time="$1"
change="$2"
difference=$(($change * 60))
result=$(( $(date -d "$time" "+%s") - $difference ))
echo `date -d "@$result" "+%H:%M"`
}
TYPE=$1
shift
TARGET=$1
shift
SLACK=5
TIME=`time_minus_minutes "$TARGET" "$SLACK"`
NAME="$@"
MSG="Meeting in $SLACK minutes. ... Meeting '$NAME' in $SLACK minutes."
#echo "Scheduling $TYPE for meeting '$NAME' at $TARGET in $SLACK minutes in advance, at $TIME."
~/schedule_${TYPE} "$TIME" "$MSG"
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
~/schedule_meeting announcement $@
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
~/schedule_meeting emergency $@
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
cd ~/build/vault-announcer/bin/
mosquitto_sub -t vault/psa/announcement | ./announcement-server
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
mosquitto_pub -t vault/psa/announcement -m "$@"