feat: rework entire file system (must change soon)

This commit is contained in:
2025-06-17 12:40:23 +02:00
parent 671daaa480
commit b06203a759
10 changed files with 242 additions and 238 deletions

19
scripts/sshd-login.sh Normal file
View File

@@ -0,0 +1,19 @@
#!bin/bash
source /etc/serverconfig/.env
case "$PAM_TYPE" in
open_session)
PAYLOAD=" { \"text\": \"$PAM_USER logged in (remote host: $PAM_RHOST) at $(date).\" }"
;;
close_session)
PAYLOAD=" { \"text\": \"$PAM_USER logged out (remote host: $PAM_RHOST) at $(date).\" }"
;;
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"
fi