✉️ A script to send message to matrix, usefull for cronjobs, monitoring, Fail2ban, logwatch..
Go to file
Oxbian 7145d18183 Updating project to be POSIX sh and creating a man page 2023-10-08 22:02:22 +02:00
LICENSE Initial commit 2023-04-24 10:38:33 +02:00
README.md Updating project to be POSIX sh and creating a man page 2023-10-08 22:02:22 +02:00
matrix-sender Updating project to be POSIX sh and creating a man page 2023-10-08 22:02:22 +02:00
matrix-sender.1 Updating project to be POSIX sh and creating a man page 2023-10-08 22:02:22 +02:00

README.md

Matrix Sender


This script allows you to send simple unencrypted message & html to matrix. It can be usefull for logging / cronjobs error or monitoring.

Install

This script is dependent of jq & curl.

To install the script, just clone this repo:

git clone https://git.arka.rocks/Oxbian/matrix-sender

And if you want you can add it to the PATH or link it to the /bin folder.

sudo ln -s $(pwd)/matrix-sender /bin/matrix-sender

Usage

First you need to edit the script with your homeserver url & the roomID

After this you need to get your token

./matrix-sender -t <username> <password>

Once all is setup, you can send messages:

  • Simple message
./matrix-sender -s <message>
  • or an HTML formatted message
./matrix-sender -html <message>

For help you can use:

./matrix-sender -h

or

./matrix-sender --help

Example

./matrix-sender -s 'Hello world!'
./matrix-sender -html '<h1 class="test"> t e s t </h1>'

Contributing

If you want to contribute, make a pull request with your contribution.

License

This project is under the GPLv3 license, you can use it in your project but not in closed sources ones. Sharing project is what make the world live, think about it.