Merge branch 'main' of dev.zaks.web.za:thisiszeev/nextcloud-telegram-notify

This commit is contained in:
Ze'ev Schurmann 2024-02-05 19:13:43 +02:00
commit 6f9f5e7fef
1 changed files with 29 additions and 0 deletions

View File

@ -6,6 +6,24 @@ Get notified when stuff happens on your Nextcloud Install.
If you don't know how to set up a Telegram bot and channel then google it. If you don't know how to set up a Telegram bot and channel then google it.
## Before you start!
The first time the script runs, either as the very first time or after a server reboot, the current information is cached in the /tmp folder as ncwhatevername.old
This is to avoid you getting hundreds of messages.
Any new information from that point on will be sent to you.
If you need assistance, please find me on [Reddit](https://reddit.com/u/thisiszeev). In your /var/log folder is the file called nextcloud-telegram-notify.log
````
# tail /var/log/nextcloud-telegram-notify.log
````
Send me the output of that command on a Reddit Chat.
Due to popular request, I am going to setup a Discord as well. Will post it here soon.
## checknewusers.sh ## checknewusers.sh
![screenshot](images/checknewusers.png) ![screenshot](images/checknewusers.png)
@ -28,6 +46,17 @@ Example crontab entry to check for updates every 4 hours:
00 */4 * * * root bash /root/scripts/nextcloud-telegram-notify/checkupdates.sh 00 */4 * * * root bash /root/scripts/nextcloud-telegram-notify/checkupdates.sh
```` ````
## failedlogins.sh
![screenshot](images/failedlogins.png)
Run this as a cronjob. It will send you a Telegram whenever a failed login occurs.
Example crontab entry to check for new failed logins every 5 minutes:
````
*/5 * * * * root bash /root/scripts/nextcloud-telegram-notify/failedlogins.sh
````
## logwatch.sh ## logwatch.sh
![screenshot](images/logwatch.png) ![screenshot](images/logwatch.png)