Selaa lähdekoodia

standardised subject

Daniel Gibbs 5 vuotta sitten
vanhempi
commit
524fc4c7c9

+ 4 - 2
lgsm/functions/alert_discord.sh

@@ -22,8 +22,10 @@ json=$(cat <<EOF
 	"file":"content",
 	"embeds": [{
 		"color": "2067276",
-		"author": {"name": "${alertemoji} ${alertsubject}", "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"},
-		"title": "",
+		"author": {
+			"name": "${alertemoji} ${alertsubject} ${alertemoji}",
+			"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"},
+		"title": "${escaped_servername}",
 		"description": ${escaped_alertbody},
 		"url": "",
 		"type": "content",

+ 2 - 2
lgsm/functions/alert_email.sh

@@ -10,9 +10,9 @@ fn_print_dots "Sending Email alert: ${email}"
 fn_sleep_time
 
 if [ "${emailfrom}" ]; then
-	mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${alertlog}"
+	mail -s "${alertemoji} ${alertsubject} ${alertemoji}" -r "${emailfrom}" "${email}" < "${alertlog}"
 else
-	mail -s "${alertsubject}" "${email}" < "${alertlog}"
+	mail -s "${alertemoji} ${alertsubject} ${alertemoji}" "${email}" < "${alertlog}"
 fi
 exitcode=$?
 if [ "${exitcode}" == "0" ]; then

+ 1 - 1
lgsm/functions/alert_ifttt.sh

@@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 json=$(cat <<EOF
 {
 	"value1": "${selfname}",
-	"value2": "${alertsubject}",
+	"value2": "${alertemoji} ${alertsubject} ${alertemoji}",
 	"value3": "Message\n${alertbody}\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

+ 1 - 1
lgsm/functions/alert_rocketchat.sh

@@ -14,7 +14,7 @@ fi
 json=$(cat <<EOF
 {
    "alias":"LinuxGSM",
-   "text":"* ${alertemoji} ${alertsubject}* + \n ${alertbody}",
+   "text":"*${alertemoji} ${alertsubject} ${alertemoji}* + \n ${alertbody}",
    "attachments":[
       {
          "title":"Linuxgsm Alert",

+ 1 - 1
lgsm/functions/alert_telegram.sh

@@ -10,7 +10,7 @@ json=$(cat <<EOF
 {
 	"chat_id": "${telegramchatid}",
 	"parse_mode": "HTML",
-	"text": "${alertemoji} <b>${alertsubject}</b> ${alertemoji}\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server name</b>\n${servername}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${alertip}:${port}'>${alertip}:${port}</a>\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>",
+	"text": "<b>${alertemoji} ${alertsubject} ${alertemoji}</b>\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server name</b>\n${servername}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${alertip}:${port}'>${alertip}:${port}</a>\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>",
 	"disable_web_page_preview": "yes",
 EOF
 )