Bofh 960aa1613b | ||
---|---|---|
bin | ||
conf | ||
src | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
build_docker.sh | ||
run_docker.sh |
README.md
Matrix.org Simple alert/notifications HTTP API bot
Uses the simple python matrixcli from https://github.com/saadnpq/matrixcli.git
Installation
Build the image using docker/podman
./build_docker.sh
The bot needs to be joined in a room before using it as a bot,
you have to do this manually once, and then configure the ROOM ID on run_docker.sh
script.
Configure this files to your needs:
./conf/config.py # for username/password configuration
./conf/auth_tokens # authentication tokens of the HTTP API (just simple strings)
./bin/bot # a working script in curl to access the api and send a message
./run_docker.sh # run container with 'docker run', configure to your needs
(Optional) Install the bin/bot by using a hardlink. Choose whatever path you want.
ln -sf $(realpath bin/bot) /usr/local/bin/mtx-alert
Run the container!
./run_docker.sh
Enjoy!
``bash
Examples:
echo 'It works!' | ./bin/bot echo 'This looks better, isnt it?' | /usr/local/bin/mtx-alert ./bin/bot "this is the message" /usr/local/bin/mtx-alert "this is another message"
Test API connection with (returns "TEST_OK")
echo test | ./bin/bot