diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh
index 7afe611a4c..7cda984894 100644
--- a/lgsm/modules/alert_gotify.sh
+++ b/lgsm/modules/alert_gotify.sh
@@ -10,8 +10,8 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
{
- "title": "${alertemoji} ${alerttitle} ${alertemoji}",
- "message": "Server name\n${servername}\n\nMessage\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}",
+ "title": "${alerttitle}",
+ "message": "Server name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}",
"priority": 5
}
EOF
diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh
index bff4c1b134..12a9a9fec7 100644
--- a/lgsm/modules/alert_ifttt.sh
+++ b/lgsm/modules/alert_ifttt.sh
@@ -7,16 +7,32 @@
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-json=$(
+jsoninfo=$(
cat << EOF
{
"value1": "${selfname}",
- "value2": "${alertemoji} ${alerttitle} ${alertemoji}",
- "value3": "Message: \n${alertmessage}\n\nGame: \n${gamename}\n\nServer name: \n${servername}\n\nHostname: \n${HOSTNAME}\n\nServer IP: \n${alertip}:${port}\n\nMore info: \n${alerturl}"
+ "value2": "${alerttitle}",
+ "value3": "Information \n${alertmessage}\n\nGame: \n${gamename}\n\nServer name \n${servername}\n\nHostname \n${HOSTNAME}\n\nServer IP \n${alertip}:${port}\n\nMore info \n${alerturl}"
}
EOF
)
+jsonnoinfo=$(
+ cat << EOF
+{
+ "value1": "${selfname}",
+ "value2": "${alerttitle}",
+ "value3": "Information \n${alertmessage}\n\nGame: \n${gamename}\n\nServer name \n${servername}\n\nHostname \n${HOSTNAME}\n\nServer IP \n${alertip}:${port}"
+}
+EOF
+)
+
+if [ -z "${alerturl}" ]; then
+ json="${jsonnoinfo}"
+else
+ json="${jsoninfo}"
+fi
+
fn_print_dots "Sending IFTTT alert"
iftttsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://maker.ifttt.com/trigger/${iftttevent}/with/key/${ifttttoken}" | grep "Bad Request")
diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh
index 7a6549762d..a8f8e56b5d 100644
--- a/lgsm/modules/alert_pushbullet.sh
+++ b/lgsm/modules/alert_pushbullet.sh
@@ -13,7 +13,7 @@ jsoninfo=$(
"channel_tag": "${channeltag}",
"type": "note",
"title": "${alerttitle}",
- "body": "Server name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}"
+ "body": "Information\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}"
}
EOF
)
@@ -24,7 +24,7 @@ jsonnoinfo=$(
"channel_tag": "${channeltag}",
"type": "note",
"title": "${alerttitle}",
- "body": "Server name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}"
+ "body": "Information\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}"
}
EOF
)
diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh
index 48009ab2c2..3adb416314 100644
--- a/lgsm/modules/alert_pushover.sh
+++ b/lgsm/modules/alert_pushover.sh
@@ -23,9 +23,9 @@ else
fi
if [ -z "${alerturl}" ]; then
- pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message=" Server name
${servername}
Information
${alertmessage}
Game
${gamename}
Server IP
${alertip}:${port}
Hostname
${HOSTNAME}" "https://api.pushover.net/1/messages.json" | grep errors)
+ pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message="Information
${alertmessage}
Game
${gamename}
Server IP
${alertip}:${port}
Hostname
${HOSTNAME}" "https://api.pushover.net/1/messages.json" | grep errors)
else
- pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message=" Server name
${servername}
Information
${alertmessage}
Game
${gamename}
Server IP
${alertip}:${port}
Hostname
${HOSTNAME}
More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors)
+ pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message="Information
${alertmessage}
Game
${gamename}
Server IP
${alertip}:${port}
Hostname
${HOSTNAME}
More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors)
fi
if [ -n "${pushoversend}" ]; then
diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh
index ffeb656abb..fa9b6fdfe2 100644
--- a/lgsm/modules/alert_rocketchat.sh
+++ b/lgsm/modules/alert_rocketchat.sh
@@ -11,23 +11,23 @@ json=$(
cat << EOF
{
"alias": "LinuxGSM",
- "text": "*${alertemoji} ${alerttitle} ${alertemoji}* \n *${servername}* \n ${alertmessage} \n More info: ${alerturl}",
+ "text": "*${alerttitle}* \n ${alertmessage} \n More info: ${alerturl}",
"attachments": [
{
"fields": [
{
"short": true,
- "title": "Game:",
+ "title": "Game",
"value": "${gamename}"
},
{
"short": true,
- "title": "Server IP:",
+ "title": "Server IP",
"value": "${alertip}:${port}"
},
{
"short": true,
- "title": "Hostname:",
+ "title": "Hostname",
"value": "${HOSTNAME}"
}
]