From b3060264fa294e0556278270b2a858e821c0b47d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 16 Oct 2021 22:24:22 +0100 Subject: [PATCH] email --- lgsm/functions/alert.sh | 22 +++++++++++----------- lgsm/functions/alert_email.sh | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index f1c7b22ed..25949d6df 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -27,7 +27,7 @@ fn_alert_log(){ fn_alert_test(){ fn_script_log_info "Sending test alert" - alerttitle="${selfname} - Test" + alerttitle="Alert - ${selfname} - Test" alertemoji="๐Ÿšง" alertsound="1" alerturl="not enabled" @@ -39,7 +39,7 @@ fn_alert_test(){ fn_alert_restart(){ fn_script_log_info "Sending alert: Restarted: ${selfname}, ${executable} is not running" - alerttitle="${selfname} - Restarted" + alerttitle="Alert - ${selfname} - Restarted" alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" @@ -51,7 +51,7 @@ fn_alert_restart(){ fn_alert_restart_query(){ fn_script_log_info "Sending alert: Restarted: ${selfname}" - alerttitle="${selfname} - Restarted" + alerttitle="Alert - ${selfname} - Restarted" alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" @@ -63,8 +63,8 @@ fn_alert_restart_query(){ fn_alert_update(){ fn_script_log_info "Sending alert: Updated: ${selfname}" - alerttitle="${selfname} - Updated" - alertemoji="๐ŸŽฎ" + alerttitle="Alert - ${selfname} - Updated" + alertemoji="๐ŸŽ‰" alertsound="1" alerturl="not enabled" alertmessage="${selfname} has received an update" @@ -75,8 +75,8 @@ fn_alert_update(){ fn_alert_check_update(){ fn_script_log_info "Sending alert: Update available" - alerttitle="${selfname} - Update available" - alertemoji="๐ŸŽฎ" + alerttitle="Alert - ${selfname} - Update available" + alertemoji="๐Ÿ’ฟ" alertsound="1" alerturl="not enabled" alertmessage="Update availablefor ${selfname}" @@ -87,7 +87,7 @@ fn_alert_check_update(){ fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" - alerttitle="${selfname}: Permissions error" + alerttitle="Alert - ${selfname}: Permissions error" alertemoji="โ—" alertsound="2" alerturl="not enabled" @@ -99,7 +99,7 @@ fn_alert_permissions(){ fn_alert_config(){ fn_script_log_info "Sending alert: New _default.cfg" - alerttitle="${selfname} - New _default.cfg" + alerttitle="Alert - ${selfname} - New _default.cfg" alertemoji="๐Ÿ“„" alertsound="1" alerturl="not enabled" @@ -111,8 +111,8 @@ fn_alert_config(){ fn_alert_wipe(){ fn_script_log_info "Sending alert: Wiped: ${selfname} wiped" - alerttitle="${selfname} - Wiped" - alertemoji="๐Ÿ’ฟ" + alerttitle="Alert - ${selfname} - Wiped" + alertemoji="๐Ÿงน" alertsound="1" alerturl="not enabled" alertmessage="${selfname} as been wiped." diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index a4e2ae716..2e6bec0c8 100755 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -11,7 +11,7 @@ fn_print_dots "Sending Email alert: ${email}" fn_sleep_time if [ -n "${emailfrom}" ]; then - mail -s "${alerttitle}" -r "${emailfrom}" "${email}" < "${alertlog}" + mail -s "${alertemoji} ${alerttitle} ${alertemoji}" -r "${emailfrom}" "${email}" < "${alertlog}" else mail -s "${alerttitle}" "${email}" < "${alertlog}" fi