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

View File

@@ -1,6 +1,6 @@
#!bin/bash
source /etc/serverconfig/.env
source /usr/local/bin/notifications.sh
case "$PAM_TYPE" in
open_session)
@@ -12,8 +12,5 @@ case "$PAM_TYPE" in
esac
if [ -n "$PAYLOAD" ] ; then
curl -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
-d "chat_id=$CHAT_ID" \
-d "text=$PLAYLOAD" \
-d "parse_mode=HTML"
send_notification "$PAYLOAD"
fi