diff --git a/roles/misc/ssh_tg_notify/templates/notify.sh b/roles/misc/ssh_tg_notify/templates/notify.sh index 8a4309c..bc3b2e3 100644 --- a/roles/misc/ssh_tg_notify/templates/notify.sh +++ b/roles/misc/ssh_tg_notify/templates/notify.sh @@ -10,7 +10,7 @@ TIMEOUT={{ timeout | quote }} URL="https://api.telegram.org/bot$KEY/sendMessage" if [[ "$PAM_SERVICE" == "sshd" && "$PAM_TYPE" == "open_session" && "$PAM_USER" != "git" && -z "$TMUX" ]]; then IP="$PAM_RHOST" - cache_file="$CACHE_DIR/$IP" + cache_file="${CACHE_DIR}/${IP}-${PAM_USER}" cache_mtime=$(stat --format="%Y" "$cache_file") current_time=$(date +%s) touch "$cache_file"