services: Switch new IRC bot to #bitlair
Some checks failed
Test / build (push) Failing after 57s

This commit is contained in:
polyfloyd 2025-06-01 19:49:38 +02:00
parent 7529832dea
commit 0f1740005a
5 changed files with 2 additions and 114 deletions

View file

@ -13,8 +13,8 @@ DynamicUser=true
Environment="MQTT_HOST={{ mqtt_internal_host }}"
Environment="BOTTLECLIP_RESOURCES=/var/lib/bottle-clip"
Environment="IRC_SERVER=irc.smurfnet.ch"
Environment="IRC_CHANNEL=#bitlair-bot-test"
Environment="IRC_NICK=Bitlair"
Environment="IRC_CHANNEL=#bitlair"
Environment="IRC_NICK=bitlair"
[Install]
WantedBy=multi-user.target

View file

@ -1,24 +0,0 @@
#!/bin/bash
# Managed by Ansible
set -eu
set -o pipefail
initial=1
mqtt-simple -h {{ mqtt_internal_host }} -t "bitlair/doorduino/+" |
while read line; do
topic=$(echo "$line" | cut -d' ' -f1 | sed "s/bitlair\/doorduino\///")
value=$(echo "$line" | cut -s -d' ' -f2-)
if [ $initial == 0 ] && [ $value != 0 ]; then
if [ $topic == "doorbell" ]; then
irc-say "DEURBEL! Open de deur beneden!"
elif [ $topic != "dooropen" ]; then
irc-say "Doorduino: $topic $value"
fi
fi
initial=0
done

View file

@ -1,13 +0,0 @@
#!/bin/bash
# Managed by Ansible
set -eu
set -o pipefail
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"
irc-say "WIP: $url"
done