blob: 23ab10a9c7996152f18931d5376443246367e740 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
function getMqttConfig
{
echo `busctl --system call io.mainframe.shopsystem.Config /io/mainframe/shopsystem/config io.mainframe.shopsystem.Config GetString ss MQTT $1 | sed -s "s;s ;;"`
}
BROKER=$(getMqttConfig broker)
TOPIC=$(getMqttConfig topic)
ON=$(getMqttConfig displayOn)
OFF=$(getMqttConfig displayOff)
mosquitto_sub -h $BROKER -t $TOPIC | while read RAW_DATA
do
case $RAW_DATA in
$ON)
vbetool dpms on
;;
$OFF)
vbetool dpms off
;;
*)
#vbetool dpms on
;;
esac
done
|