aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2023-04-24 13:15:49 +0200
committerOxbian <got.dacs@slmail.me>2023-04-24 13:15:49 +0200
commitd36bf2981e438855a0da5904d9131b2737da6107 (patch)
treefee2621b49de09a039db6daacac00c834280e5d7
parent3b53c42d851fa737b8a5efada6baad327ab2e3ba (diff)
downloadmatrix-monitoring-d36bf2981e438855a0da5904d9131b2737da6107.tar.gz
matrix-monitoring-d36bf2981e438855a0da5904d9131b2737da6107.zip
Adding matrix-sender submodules & logwatch.sh
-rw-r--r--.gitmodules3
-rw-r--r--README.md27
-rwxr-xr-xlogwatch.sh18
m---------matrix-sender0
4 files changed, 47 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..b66f829
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "matrix-sender"]
+ path = matrix-sender
+ url = https://github.com/Oxbian/matrix-sender.git
diff --git a/README.md b/README.md
index fd496b6..879681c 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,27 @@
# matrix-monitoring
-Some scripts to monitor your server and send data to matrix.
+------
+
+Some scripts to monitor your server and send data to matrix. Those scripts use a [matrix-sender](), another script I made to send message to matrix.
+
+## Install
+
+To install this project & load submodules, use:
+
+```bash
+git clone --recurse-submodules https://github.com/Oxbian/matrix-monitoring.git
+```
+
+Or you can use:
+```bash
+git clone https://github.com/Oxbian/matrix-monitoring.git
+git submodule update --init --recursive
+```
+
+## 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.
diff --git a/logwatch.sh b/logwatch.sh
new file mode 100755
index 0000000..4081489
--- /dev/null
+++ b/logwatch.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Scripts to send logwatch log to matrix
+
+#set -x
+
+# Ensure the logwatch folder exist
+mkdir -p /var/cache/logwatch
+
+# matrix.sh absolute path
+MATRIX_SH_PATH=''
+
+# Variable
+today=$(date +%d-%m-%Y)
+filename=/var/cache/logwatch/$today-logwatch.html
+
+# Execute
+/usr/sbin/logwatch --output file --format html --filename $filename
+$MATRIX_SH_PATH -html $(cat $filename)
diff --git a/matrix-sender b/matrix-sender
new file mode 160000
+Subproject f2dd7b531225347f3a2365144156429d7f98b0a
ArKa projects. All rights to me, and your next child right arm.