nextcloud-telegram-notify/README.md

94 lines
3.2 KiB
Markdown
Raw Permalink Normal View History

2024-02-01 03:10:38 +02:00
# nextcloud-telegram-notify
2024-02-01 03:39:28 +02:00
This is going to become a collection of scripts, which will eventually become one script to rule them all.
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.
2024-02-05 19:02:33 +02:00
## 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.
2024-02-01 04:30:43 +02:00
## checknewusers.sh
![screenshot](images/checknewusers.png)
Run this as a cronjob. It will send you a Telegram whenever a new user registers or a new user is added.
2024-02-01 04:35:24 +02:00
Example crontab entry to check for new users every 15 minutes:
2024-02-01 04:30:43 +02:00
````
*/15 * * * * root bash /root/scripts/nextcloud-telegram-notify/checknewusers.sh
````
2024-02-01 03:39:28 +02:00
## checkupdates.sh
![screenshot](images/checkupdates.png)
2024-02-01 03:42:20 +02:00
Run this as a cronjob. It will send you no more than one Telegram per day if there are updates available.
Example crontab entry to check for updates every 4 hours:
````
00 */4 * * * root bash /root/scripts/nextcloud-telegram-notify/checkupdates.sh
2024-02-05 14:53:08 +02:00
````
2024-02-05 18:50:16 +02:00
## 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:
````
2024-02-05 18:51:49 +02:00
*/5 * * * * root bash /root/scripts/nextcloud-telegram-notify/failedlogins.sh
2024-02-05 18:50:16 +02:00
````
2024-02-05 14:53:08 +02:00
## logwatch.sh
![screenshot](images/logwatch.png)
Run this as a cronjob. It will send you a Telegram every time the log file receives an update, but only at the log level you preselect.
Example crontab entry to check for updates every 15 minutes:
````
*/15 * * * * root bash /root/scripts/nextcloud-telegram-notify/logwatch.sh
2024-02-05 15:20:16 +02:00
````
# Donations
Please consider making me small donation. Even though my scripts are open source and free to use, I still need to eat. And the occasional bottle of wine also goes down well.
- $5 buys me a cup of coffee
- $10 buys me a nice burger
- $20 buys me a bottle of wine
- Anything above that will be awesome as well.
You can send me a donation via Paypal https://www.paypal.com/paypalme/thisiszeev
Drop me a message on Reddit if you do make a donation. u/thisiszeev
Support is only offered freely to those who donate $20 or more.
Your donation contributes to further development.
2024-02-05 19:23:39 +02:00
If you need a custom script, contact me on Reddit for pricing.
# Get notified when there are updates to this repo...
https://nca.zaks.web.za/index.php/apps/forms/s/8fDpCRzkKRMaBRakNtfyigcQ
Your email address will not be used for any other purpose than to be notifed, not more than once a week, of updates to this or any of the other repos I have on this server. You can also ask me to remove you from the list at anytime, and I will comply.