@ -34,34 +34,46 @@ fn_alert_test() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = "Testing LinuxGSM Alert. No action to be taken."
alertbody = "Testing LinuxGSM Alert. No action to be taken."
# Green
alertcolourhex = "#cdcd00"
alertcolourdec = "13487360"
}
}
# Running command manually
# Running command manually
fn_alert_stopped( ) {
fn_alert_stopped( ) {
fn_script_log_info "Sending alert: Stopped"
fn_script_log_info "Sending alert: Stopped"
alertsubject = " Alert - ${ selfname } - Stopped "
alertsubject = " Alert - ${ selfname } - Stopped "
alertemoji = "🟠 "
alertemoji = "❌ "
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has stopped "
alertbody = " ${ selfname } has stopped "
# Red
alertcolourhex = "#cd0000"
alertcolourdec = "13434880"
}
}
fn_alert_started( ) {
fn_alert_started( ) {
fn_script_log_info "Sending alert: Stopp ed"
fn_script_log_info "Sending alert: Start ed"
alertsubject = " Alert - ${ selfname } - Stopp ed "
alertsubject = " Alert - ${ selfname } - Start ed "
alertemoji = "🟠 "
alertemoji = "✅ "
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has started "
alertbody = " ${ selfname } has started "
# Green
alertcolourhex = "#00cd00"
alertcolourdec = "52480"
}
}
fn_alert_restarted( ) {
fn_alert_restarted( ) {
fn_script_log_info "Sending alert: Restarted"
fn_script_log_info "Sending alert: Restarted"
alertsubject = " Alert - ${ selfname } - Restarted "
alertsubject = " Alert - ${ selfname } - Restarted "
alertemoji = "🟠 "
alertemoji = "↺ "
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has restarted "
alertbody = " ${ selfname } has restarted "
# Green
alertcolourhex = "#00cd00"
alertcolourdec = "52480"
}
}
# Failed monitor checks
# Failed monitor checks
@ -72,6 +84,9 @@ fn_alert_monitor_session() {
alertsound = "2"
alertsound = "2"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } ${ executable } not running "
alertbody = " ${ selfname } ${ executable } not running "
# Red
alertcolourhex = "#cd0000"
alertcolourdec = "13434880"
}
}
fn_alert_monitor_query( ) {
fn_alert_monitor_query( ) {
@ -81,6 +96,9 @@ fn_alert_monitor_query() {
alertsound = "2"
alertsound = "2"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " Unable to query: ${ selfname } "
alertbody = " Unable to query: ${ selfname } "
# Red
alertcolourhex = "#cd0000"
alertcolourdec = "13434880"
}
}
# Update alerts
# Update alerts
@ -91,6 +109,9 @@ fn_alert_update() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ gamename } received update: ${ remotebuildversion } "
alertbody = " ${ gamename } received update: ${ remotebuildversion } "
# Green
alertcolourhex = "#00cd00"
alertcolourdec = "52480"
}
}
fn_alert_check_update( ) {
fn_alert_check_update( ) {
@ -100,6 +121,9 @@ fn_alert_check_update() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ gamename } update available: ${ remotebuildversion } "
alertbody = " ${ gamename } update available: ${ remotebuildversion } "
# Blue
alertcolourhex = "#1e90ff"
alertcolourdec = "2003199"
}
}
fn_alert_permissions( ) {
fn_alert_permissions( ) {
@ -109,6 +133,9 @@ fn_alert_permissions() {
alertsound = "2"
alertsound = "2"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has permissions issues "
alertbody = " ${ selfname } has permissions issues "
# Red
alertcolourhex = "#cd0000"
alertcolourdec = "13434880"
}
}
fn_alert_config( ) {
fn_alert_config( ) {
@ -118,6 +145,9 @@ fn_alert_config() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has received a new _default.cfg. Check file for changes. "
alertbody = " ${ selfname } has received a new _default.cfg. Check file for changes. "
# Blue
alertcolourhex = "#1e90ff"
alertcolourdec = "2003199"
}
}
fn_alert_wipe( ) {
fn_alert_wipe( ) {
@ -127,6 +157,9 @@ fn_alert_wipe() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } has been wiped "
alertbody = " ${ selfname } has been wiped "
# Blue
alertcolourhex = "#1e90ff"
alertcolourdec = "2003199"
}
}
fn_alert_info( ) {
fn_alert_info( ) {
@ -136,6 +169,9 @@ fn_alert_info() {
alertsound = "1"
alertsound = "1"
alerturl = "not enabled"
alerturl = "not enabled"
alertbody = " ${ selfname } info "
alertbody = " ${ selfname } info "
# Blue
alertcolourhex = "#1e90ff"
alertcolourdec = "2003199"
}
}
if [ " ${ alert } " = = "permissions" ] ; then
if [ " ${ alert } " = = "permissions" ] ; then