aboutsummaryrefslogtreecommitdiff
path: root/login-notify.sh
diff options
context:
space:
mode:
Diffstat (limited to 'login-notify.sh')
-rwxr-xr-xlogin-notify.sh11
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
+
ArKa projects. All rights to me, and your next child right arm.