server-scripts/notify-login.sh

6 lines
226 B
Bash
Raw Permalink Normal View History

2022-06-05 11:20:56 +02:00
#!/bin/sh
2022-09-19 14:48:22 +02:00
if [ "$PAM_USER" != "gitea" ] && [ "$PAM_TYPE" != "close_session" ]; then
2022-06-05 11:20:56 +02:00
echo -e "$PAM_USER has successfully logged in on $(hostname) from $PAM_RHOST" | $(dirname $0)/mail.sh "$(hostname) SSH Login: $PAM_USER"
fi