mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 01:34:22 +00:00
feat: Add emojis to notification titles
This commit is contained in:
@@ -94,7 +94,7 @@ done < "$BACKUP"
|
||||
source /usr/local/bin/libs/notifications.sh
|
||||
|
||||
if [[ "$BACKUP_SUCCESS" == true ]]; then
|
||||
send_notification "<b>AWS Backup:</b> All files successfully backed up."
|
||||
send_notification "<b>💿 AWS Backup 💿 :</b> All files successfully backed up."
|
||||
else
|
||||
send_notification "<b>AWS Backup:</b> One or more files failed to back up. Check the log for details."
|
||||
send_notification "<b>💿 AWS Backup 💿 :</b> One or more files failed to back up. Check the log for details."
|
||||
fi
|
||||
@@ -27,8 +27,8 @@ send_notification "$(
|
||||
usage = $5;
|
||||
gsub("%", "", usage);
|
||||
if (usage > max) {
|
||||
printf "<b>Warning:</b>\nDisk usage is at <code>%d%%</code>, which exceeds the threshold of <code>%d%%</code>.\n\n", usage, max;
|
||||
printf "<b>⚠️ Warning ⚠️:</b>\nDisk usage is at <code>%d%%</code>, which exceeds the threshold of <code>%d%%</code>.\n\n", usage, max;
|
||||
}
|
||||
printf "<b>Disk Usage Information:</b>\nTotal: <code>%s</code>, Used: <code>%s</code>, Available: <code>%s</code>\n", $2, $3, $4;
|
||||
printf "<b>💾 Disk Usage Information 💾 :</b>\nTotal: <code>%s</code>, Used: <code>%s</code>, Available: <code>%s</code>\n", $2, $3, $4;
|
||||
}'
|
||||
)"
|
||||
|
||||
@@ -31,10 +31,10 @@ source /usr/local/bin/libs/notifications.sh
|
||||
|
||||
case "$PAM_TYPE" in
|
||||
open_session)
|
||||
PAYLOAD=$(printf "<b>Login Event</b>\nUser <code>%s</code> logged in from <code>%s</code> at <i>%s</i>." "$PAM_USER" "$PAM_RHOST" "$(date)")
|
||||
PAYLOAD=$(printf "<b>🚨 Login Event 🚨</b>\nUser <code>%s</code> logged in from <code>%s</code> at <i>%s</i>." "$PAM_USER" "$PAM_RHOST" "$(date)")
|
||||
;;
|
||||
close_session)
|
||||
PAYLOAD=$(printf "<b>Logout Event</b>\nUser <code>%s</code> logged out from <code>%s</code> at <i>%s</i>." "$PAM_USER" "$PAM_RHOST" "$(date)")
|
||||
PAYLOAD=$(printf "<b>🚨 Logout Event 🚨</b>\nUser <code>%s</code> logged out from <code>%s</code> at <i>%s</i>." "$PAM_USER" "$PAM_RHOST" "$(date)")
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user