From 9bcac2ea7f4203050800aa5854afc89b24d7bc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GUEZO?= Date: Sat, 2 Aug 2025 20:07:39 +0200 Subject: [PATCH] feat: rework notifications --- scripts/disk-monitor.sh | 6 +++--- scripts/sshd-login.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/disk-monitor.sh b/scripts/disk-monitor.sh index ac632dd..8a472b2 100644 --- a/scripts/disk-monitor.sh +++ b/scripts/disk-monitor.sh @@ -27,8 +27,8 @@ send_notification "$( usage = $5; gsub("%", "", usage); if (usage > max) { - printf "🚨 WARNING:\nDisk usage is at %d%%. which exceed the treshold of %d%%.\n\n", usage, max; - } - printf "💾 Disk Usage Information:\nTotal Size: %s, Used: %s, Available: %s\n\n", $2, $3, $4; + printf "Warning:\nDisk usage is at %d%%, which exceeds the threshold of %d%%.\n\n", usage, max; + } + printf "Disk Usage Information:\nTotal: %s, Used: %s, Available: %s\n", $2, $3, $4; }' )" diff --git a/scripts/sshd-login.sh b/scripts/sshd-login.sh index 60ac96e..4d8b266 100644 --- a/scripts/sshd-login.sh +++ b/scripts/sshd-login.sh @@ -30,12 +30,12 @@ fi source /usr/local/bin/libs/notifications.sh case "$PAM_TYPE" in - open_session) - PAYLOAD="$PAM_USER logged in (remote host: $PAM_RHOST) at $(date)." - ;; - close_session) - PAYLOAD="$PAM_USER logged out (remote host: $PAM_RHOST) at $(date)." - ;; + open_session) + PAYLOAD="Login Event\nUser $PAM_USER logged in from $PAM_RHOST at $(date)." + ;; + close_session) + PAYLOAD="Logout Event\nUser $PAM_USER logged out from $PAM_RHOST at $(date)." + ;; esac if [ -n "$PAYLOAD" ] ; then