Browse Source

update

feature/alerts-refactor
Daniel Gibbs 4 years ago
parent
commit
91c14fd6f2
No known key found for this signature in database GPG Key ID: 2EBB36015C6D78E2
  1. 16
      lgsm/functions/alert.sh
  2. 2
      lgsm/functions/alert_slack.sh

16
lgsm/functions/alert.sh

@ -27,7 +27,7 @@ fn_alert_log(){
fn_alert_test(){
fn_script_log_info "Sending test alert"
alerttitle="Alert - ${selfname} - Test"
alerttitle="${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="Alert - ${selfname} - Restarted"
alerttitle="${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="Alert - ${selfname} - Restarted"
alerttitle="${selfname} - Restarted"
alertemoji="🚨"
alertsound="2"
alerturl="not enabled"
@ -63,7 +63,7 @@ fn_alert_restart_query(){
fn_alert_update(){
fn_script_log_info "Sending alert: Updated: ${selfname}"
alerttitle="Alert - ${selfname} - Updated"
alerttitle="${selfname} - Updated"
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
@ -75,7 +75,7 @@ fn_alert_update(){
fn_alert_check_update(){
fn_script_log_info "Sending alert: Update available"
alerttitle="Alert - ${selfname} - Update available"
alerttitle="${selfname} - Update available"
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
@ -87,7 +87,7 @@ fn_alert_check_update(){
fn_alert_permissions(){
fn_script_log_info "Sending alert: Permissions error"
alerttitle="Alert - ${selfname}: Permissions error"
alerttitle="${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="Alert - ${selfname} - New _default.cfg"
alerttitle="${selfname} - New _default.cfg"
alertemoji="📄"
alertsound="1"
alerturl="not enabled"
@ -111,7 +111,7 @@ fn_alert_config(){
fn_alert_wipe(){
fn_script_log_info "Sending alert: Wiped: ${selfname} wiped"
alerttitle="Alert - ${selfname} - Wiped"
alerttitle="${selfname} - Wiped"
alertemoji="💿"
alertsound="1"
alerturl="not enabled"

2
lgsm/functions/alert_slack.sh

@ -36,7 +36,7 @@ json=$(cat <<EOF
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${alertemoji} ${alerttitle}* \n ${alertmessage}"
"text": "*${alertemoji} ${alerttitle}*"
}
},
{

Loading…
Cancel
Save