Add time to login notifications

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2023-12-23 20:18:30 +01:00
parent 6331357b45
commit e9f0b6b896
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -63,11 +63,11 @@
{ {
if [ "$PAM_TYPE" = "open_session" ] ; then if [ "$PAM_TYPE" = "open_session" ] ; then
${getExe' pkgs.coreutils "cat"} <<EOF ${getExe' pkgs.coreutils "cat"} <<EOF
**Opened** ${sessionName} session for user **$PAM_USER** from host **$PAM_RHOST** \`$(date --rfc-3339=seconds)\` **Opened** ${sessionName} session for user **$PAM_USER** from host **$PAM_RHOST**
EOF EOF
elif [ "$PAM_TYPE" = "close_session" ] ; then elif [ "$PAM_TYPE" = "close_session" ] ; then
${getExe' pkgs.coreutils "cat"} <<EOF ${getExe' pkgs.coreutils "cat"} <<EOF
**Closed** ${sessionName} session for user **$PAM_USER** from host **$PAM_RHOST** \`$(date --rfc-3339=seconds)\` **Closed** ${sessionName} session for user **$PAM_USER** from host **$PAM_RHOST**
EOF EOF
else else
${getExe' pkgs.coreutils "cat"} <<EOF ${getExe' pkgs.coreutils "cat"} <<EOF