|
|
|
@ -10,5 +10,5 @@ if [[ "$PAM_SERVICE" == "sshd" && "$PAM_TYPE" == "open_session" && "$PAM_USER" !
|
|
|
|
|
IP="$PAM_RHOST"
|
|
|
|
|
HOSTNAME=$(hostname --fqdn)
|
|
|
|
|
TEXT="Successful login from [$IP](https://ipinfo.io/$IP) for ${PAM_USER} @ ${HOSTNAME} ($(date "+%Y-%m-%d %H:%M"))"
|
|
|
|
|
curl -s --max-time $TIMEOUT -d "chat_id=$USERID" -d "disable_web_page_preview=1" -d "parse_mode=Markdown" -d "text=$TEXT" "$URL" > /dev/null
|
|
|
|
|
curl -s --max-time "$TIMEOUT" -d "chat_id=$USERID" -d "disable_web_page_preview=1" -d "parse_mode=Markdown" -d "text=$TEXT" "$URL" > /dev/null
|
|
|
|
|
fi
|
|
|
|
|