fix: add few functions

- create send_notification function
- auto scripts/*.sh scripts searcher
This commit is contained in:
2025-06-18 23:18:52 +02:00
parent 98aa864306
commit 4856b90ee1
5 changed files with 28 additions and 26 deletions

11
scripts/notifications.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
source /etc/serverconfig/.env
send_notification() {
local message="$1"
curl -X POST "https://api.telegram.org/bot$TELEGRAM_TOKEN/sendMessage" \
-d "chat_id=$TELEGRAM_CHAT_ID" \
-d "text=$message" \
-d "parse_mode=HTML"
}