|
|
@@ -13,32 +13,32 @@ fi
|
|
|
|
|
|
json=$(cat <<EOF
|
|
|
{
|
|
|
- "alias":"LinuxGSM",
|
|
|
- "text":"*${alertemoji} ${alertsubject} ${alertemoji}* + \n ${escaped_alertbody}",
|
|
|
- "attachments":[
|
|
|
- {
|
|
|
- "title":"Linuxgsm Alert",
|
|
|
- "text":"Hostname: ${HOSTNAME}",
|
|
|
- "color":"#36a64f",
|
|
|
- "fields":[
|
|
|
- {
|
|
|
- "short":true,
|
|
|
- "title":"Game:",
|
|
|
- "value":"${gamename}"
|
|
|
- },
|
|
|
- {
|
|
|
- "short":true,
|
|
|
- "title":"Server IP:",
|
|
|
- "value":"${alertip}:${port}"
|
|
|
- },
|
|
|
- {
|
|
|
- "short":true,
|
|
|
- "title":"Server Name:",
|
|
|
- "value":"${escaped_servername}"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
+ "alias": "LinuxGSM",
|
|
|
+ "text": "*${alertemoji} ${alertsubject} ${alertemoji}* + \n ${escaped_alertbody}",
|
|
|
+ "attachments": [
|
|
|
+ {
|
|
|
+ "title": "Linuxgsm Alert",
|
|
|
+ "text": "Hostname: ${HOSTNAME}",
|
|
|
+ "color": "#36a64f",
|
|
|
+ "fields": [
|
|
|
+ {
|
|
|
+ "short": true,
|
|
|
+ "title": "Game:",
|
|
|
+ "value": "${gamename}"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "short": true,
|
|
|
+ "title": "Server IP:",
|
|
|
+ "value": "${alertip}:${port}"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "short": true,
|
|
|
+ "title": "Server Name:",
|
|
|
+ "value": "${escaped_servername}"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
EOF
|
|
|
)
|
|
|
@@ -51,6 +51,6 @@ if [ "${rocketlaunch}" == "ok" ]; then
|
|
|
fn_print_ok_nl "Sending Rocketchat alert"
|
|
|
fn_script_log_pass "Sending Rocketchat alert"
|
|
|
else
|
|
|
- fn_print_fail_nl "Sending Rocketchat alert: ${rocketlaunch}"
|
|
|
+ fn_print_fail_nl "Sending Rocketchat alert: ${rocketlaunch}"
|
|
|
fn_script_log_fatal "Sending Rocketchat alert: ${rocketlaunch}"
|
|
|
fi
|