ソースを参照

Release 20.5.0

Daniel Gibbs 5 年 前
コミット
5b84fb5bf4

+ 2 - 1
lgsm/functions/alert_discord.sh

@@ -21,7 +21,8 @@ json=$(cat <<EOF
 		"color": "2067276",
 		"author": {
 			"name": "${alertemoji} ${alertsubject} ${alertemoji}",
-			"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"},
+			"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"
+		},
 		"title": "${servername}",
 		"description": "${alertbody} \n More info: ${alerturl}",
 		"url": "",

+ 1 - 1
lgsm/functions/alert_rocketchat.sh

@@ -48,6 +48,6 @@ if [ -n "${rocketchatsend}" ]; then
 	fn_print_ok_nl "Sending Rocketchat alert"
 	fn_script_log_pass "Sending Rocketchat alert"
 else
-		fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}"
+	fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}"
 	fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}"
 fi

+ 49 - 54
lgsm/functions/alert_slack.sh

@@ -13,59 +13,54 @@ fi
 
 json=$(cat <<EOF
 {
-	"attachments": [
-		{
-			"blocks": [
-				{
-					"type": "section",
-					"text": {
-						"type": "mrkdwn",
-						"text": "*${alertemoji} ${alertsubject} ${alertemoji}*"
-					}
-				},
-				{
-					"type": "section",
-					"text": {
-						"type": "mrkdwn",
-						"text": "*${servername}*"
-					}
-				},
-				{
-					"type": "section",
-					"text": {
-						"type": "mrkdwn",
-						"text": "${alertbody} \n More info: ${alerturl}"
-					}
-				},
-				{
-					"type": "divider"
-				},
-				{
-					"type": "section",
-					"fields": [
-						{
-							"type": "mrkdwn",
-							"text": "*Game:* \n ${gamename}"
-						},
-						{
-							"type": "mrkdwn",
-							"text": "*Server IP:* \n ${alertip}:${port}"
-						}
-					]
-				},
-				{
-					"type": "divider"
-				},
-				{
-					"type": "section",
-					"text": {
-						"type": "mrkdwn",
-						"text": "*Hostname:* ${HOSTNAME}"
-					}
-				}
-			]
-		}
-	]
+		"attachments": [
+			{
+				"color": "#36a64f",
+				"blocks": [
+					{
+										"type": "section",
+										"text": {
+												"type": "mrkdwn",
+												"text": "*LinuxGSM Alert*"
+										}
+								},
+								{
+										"type": "section",
+										"text": {
+												"type": "mrkdwn",
+												"text": "*${alertemoji} ${alertsubject}* \n ${alertbody}"
+										}
+								},
+								{
+										"type": "divider"
+								},
+								{
+										"type": "section",
+										"fields": [
+												{
+														"type": "mrkdwn",
+														"text": "*Game:* \n ${gamename}"
+												},
+												{
+														"type": "mrkdwn",
+														"text": "*Server IP:* \n ${alertip}:${port}"
+												},
+												{
+														"type": "mrkdwn",
+														"text": "*Server Name:* \n ${servername}"
+												}
+										]
+								},
+					 {
+										"type": "section",
+										"text": {
+														"type": "mrkdwn",
+														"text": "Hostname: ${HOSTNAME} / More info: ${alerturl}"
+										}
+								}
+						]
+			}
+		]
 }
 EOF
 )
@@ -78,6 +73,6 @@ if [ "${slacksend}" == "ok" ]; then
 	fn_print_ok_nl "Sending Slack alert"
 	fn_script_log_pass "Sending Slack alert"
 else
-		fn_print_fail_nl "Sending Slack alert: ${slacksend}"
+	fn_print_fail_nl "Sending Slack alert: ${slacksend}"
 	fn_script_log_fatal "Sending Slack alert: ${slacksend}"
 fi

+ 4 - 4
lgsm/functions/check_ip.sh

@@ -27,10 +27,10 @@ if [ -n "${ip}" ]&&[ "${ip}" != "0.0.0.0" ]; then
 	telnetip=( "${ip}" )
 # If game config does have an IP set.
 elif [ -n "${configip}" ]&&[ "${configip}" != "0.0.0.0" ];then
-		queryips=( "${configip}" )
-		ip="${configip}"
-		webadminip=( "${configip}" )
-		telnetip=( "${configip}" )
+	queryips=( "${configip}" )
+	ip="${configip}"
+	webadminip=( "${configip}" )
+	telnetip=( "${configip}" )
 # If there is only 1 server IP address.
 # Some IP details can automaticly use the one IP
 elif [ "${getipwc}" == "1" ]; then

+ 1 - 1
lgsm/functions/command_postdetails.sh

@@ -73,8 +73,8 @@ if [ ${firstcommandname} == "POST-DETAILS" ]; then
 	echo -e "${pdurl}"
 fi
 fn_script_log_info "${pdurl}"
+alerturl="${pdurl}"
 
 if [ -z "${exitbypass}" ]; then
 	core_exit.sh
 fi
-alerturl="${pdurl}"

+ 1 - 1
lgsm/functions/command_update.sh

@@ -27,7 +27,7 @@ elif [ "${shortname}" == "fctr" ]; then
 elif [ "${shortname}" == "mta" ]; then
 	update_mta.sh
 elif [ "${shortname}" == "jk2" ]; then
-	update_jediknight2.sh	
+	update_jediknight2.sh
 else
 	update_steamcmd.sh
 fi

+ 0 - 0
lgsm/functions/command_update_functions.sh


+ 1 - 1
lgsm/functions/core_functions.sh

@@ -7,7 +7,7 @@
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-modulesversion="v20.4.1"
+modulesversion="v20.5.0"
 
 # Core
 

+ 1 - 1
lgsm/functions/fix_squad.sh

@@ -8,7 +8,7 @@
 oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}"
 if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then
 	# diff old and new config - if it is different move the old config over the new one
-	if [ $(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l) -gt 0 ]; then
+	if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then
 		fixname="Migrate server config to new Game folder"
 		fn_fix_msg_start
 		mv -v "${oldservercfg}" "${servercfgfullpath}"

+ 1 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.1"
+version="v20.5.0"
 shortname="core"
 gameservername="core"
 commandname="CORE"

+ 7 - 4
tests/tests_defaultcfg/defaultcfg_0.txt

@@ -1,8 +1,6 @@
 stats
 displayip
 postalert
-postdays
-posttarget
 discordalert
 discordwebhook
 emailalert
@@ -19,10 +17,13 @@ mailgunemail
 pushbulletalert
 pushbullettoken
 channeltag
-pushoveralert
-pushovertoken
+rocketchatalert
+rocketchatwebhook
+rocketchattoken
 slackalert
 slackwebhook
+pushoveralert
+pushovertoken
 telegramalert
 telegramtoken
 telegramchatid
@@ -38,6 +39,8 @@ sleeptime
 stopmode
 querymode
 querytype
+consoleverbose
+consoleinteract
 gamename
 engine
 glibc

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.1"
+version="v20.5.0"
 shortname="fctr"
 gameservername="fctrserver"
 commandname="CORE"

+ 1 - 1
tests/tests_jc2server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.1"
+version="v20.5.0"
 shortname="jc2"
 gameservername="jc2server"
 commandname="CORE"

+ 1 - 1
tests/tests_mcserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.1"
+version="v20.5.0"
 shortname="mc"
 gameservername="mcserver"
 commandname="CORE"

+ 1 - 1
tests/tests_ts3server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.1"
+version="v20.5.0"
 shortname="ts3"
 gameservername="ts3server"
 commandname="CORE"