From a916f66585cadddfe158382cb02ba1b3af59efd4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 22 Aug 2017 12:52:43 +0100 Subject: [PATCH] pushover now working --- lgsm/functions/alert.sh | 17 ++++++++++------ lgsm/functions/alert_pushover.sh | 35 ++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index c0f4ff6d1..ca8beed12 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -9,40 +9,45 @@ local commandaction="Alert" fn_alert_test(){ fn_script_log_info "Sending test alert" - alertsubject="Alert - ${servicename} - Test" - alertemoji="🚨" + alertsubject="Alert - ${servicename}: Test" + alertemoji="🚧" + alertsound="1" alerturl="https://gameservermanagers.com" alertbody="Testing LinuxGSM Alert. No action to be taken." } fn_alert_restart(){ fn_script_log_info "Sending alert: Restarted: ${executable} not running" - alertsubject="Alert - ${servicename} - Restarted" + alertsubject="Alert - ${servicename}: Restarted" alertemoji="🚨" + alertsound="2" alerturl="https://gameservermanagers.com" alertbody="${servicename} ${executable} not running" } fn_alert_restart_query(){ fn_script_log_info "Sending alert: Restarted: ${gsquerycmd}" - alertsubject="Alert - ${servicename} - Restarted" + alertsubject="Alert - ${servicename}: Restarted" alertemoji="🚨" + alertsound="2" alerturl="https://gameservermanagers.com" alertbody="gsquery.py failed to query: ${gsquerycmd}" } fn_alert_update(){ fn_script_log_info "Sending alert: Updated" - alertsubject="Alert - ${servicename} - Updated" + alertsubject="Alert - ${servicename}: Updated" alertemoji="🎮" + alertsound="1" alerturl="https://gameservermanagers.com" alertbody="${gamename} received update" } fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" - alertsubject="Alert - ${servicename} - Permissions error" + alertsubject="Alert - ${servicename}: Permissions error" alertemoji="❗" + alertsound="2" alerturl="https://gameservermanagers.com" alertbody="${servicename} has permissions issues" } diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/functions/alert_pushover.sh index cd7651468..86adbbce5 100644 --- a/lgsm/functions/alert_pushover.sh +++ b/lgsm/functions/alert_pushover.sh @@ -8,15 +8,28 @@ local commandname="ALERT" local commandaction="Alert" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -json=$(cat <