Use global config for MQTT hosts
This commit is contained in:
parent
1a26f81be6
commit
fd6cc59b48
8 changed files with 9 additions and 7 deletions
|
@ -10,7 +10,7 @@ Restart=on-failure
|
|||
RestartSec=10s
|
||||
ExecStart=/var/lib/discord-bot/.venv/bin/python /var/lib/discord-bot/main.py
|
||||
DynamicUser=true
|
||||
Environment="MQTT_HOST=bitlair.nl"
|
||||
Environment="MQTT_HOST={{ mqtt_internal_host }}"
|
||||
Environment="DISCORD_WEBHOOK_URL={{ discord_webhook_url }}"
|
||||
Environment="DISCORD_TOKEN={{ discord_token }}"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
mqtt-simple -h mqtt.bitlair.nl -s "bitlair/photos" |
|
||||
mqtt-simple -h {{ mqtt_internal_host }} -s "bitlair/photos" |
|
||||
while read event; do
|
||||
path=$(echo $event | cut -d ' ' -f 2)
|
||||
url="https://bitlair.nl/fotos/view/$path"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mqtt_server = 'mqtt.bitlair.nl'
|
||||
mqtt_server = '{{ mqtt_internal_host }}'
|
||||
mqtt_port = 1883
|
||||
|
||||
spacestate_topic = 'bitlair/state'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue