diff options
Diffstat (limited to 'login-notify.sh')
-rwxr-xr-x | login-notify.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/login-notify.sh b/login-notify.sh new file mode 100755 index 0000000..8c2da2f --- /dev/null +++ b/login-notify.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Absolute path of the matrix.sh file +MATRIX_PATH='' + +if [ "$PAM_TYPE" != "close_session" ]; then + host="$(hostname)" + message="SSH Login: $PAM_USER from $PAM_RHOST on $host" + $MATRIX_PATH -s $message +fi + |