Skip to content

Commit 5b84fb5

Browse files
committed
Release 20.5.0
1 parent 5864379 commit 5b84fb5

15 files changed

+72
-73
lines changed

lgsm/functions/alert_discord.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ json=$(cat <<EOF
2121
"color": "2067276",
2222
"author": {
2323
"name": "${alertemoji} ${alertsubject} ${alertemoji}",
24-
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"},
24+
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"
25+
},
2526
"title": "${servername}",
2627
"description": "${alertbody} \n More info: ${alerturl}",
2728
"url": "",

lgsm/functions/alert_rocketchat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ if [ -n "${rocketchatsend}" ]; then
4848
fn_print_ok_nl "Sending Rocketchat alert"
4949
fn_script_log_pass "Sending Rocketchat alert"
5050
else
51-
fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}"
51+
fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}"
5252
fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}"
5353
fi

lgsm/functions/alert_slack.sh

Lines changed: 49 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,54 @@ fi
1313

1414
json=$(cat <<EOF
1515
{
16-
"attachments": [
17-
{
18-
"blocks": [
19-
{
20-
"type": "section",
21-
"text": {
22-
"type": "mrkdwn",
23-
"text": "*${alertemoji} ${alertsubject} ${alertemoji}*"
24-
}
25-
},
26-
{
27-
"type": "section",
28-
"text": {
29-
"type": "mrkdwn",
30-
"text": "*${servername}*"
31-
}
32-
},
33-
{
34-
"type": "section",
35-
"text": {
36-
"type": "mrkdwn",
37-
"text": "${alertbody} \n More info: ${alerturl}"
38-
}
39-
},
40-
{
41-
"type": "divider"
42-
},
43-
{
44-
"type": "section",
45-
"fields": [
46-
{
47-
"type": "mrkdwn",
48-
"text": "*Game:* \n ${gamename}"
49-
},
50-
{
51-
"type": "mrkdwn",
52-
"text": "*Server IP:* \n ${alertip}:${port}"
53-
}
54-
]
55-
},
56-
{
57-
"type": "divider"
58-
},
59-
{
60-
"type": "section",
61-
"text": {
62-
"type": "mrkdwn",
63-
"text": "*Hostname:* ${HOSTNAME}"
64-
}
65-
}
66-
]
67-
}
68-
]
16+
"attachments": [
17+
{
18+
"color": "#36a64f",
19+
"blocks": [
20+
{
21+
"type": "section",
22+
"text": {
23+
"type": "mrkdwn",
24+
"text": "*LinuxGSM Alert*"
25+
}
26+
},
27+
{
28+
"type": "section",
29+
"text": {
30+
"type": "mrkdwn",
31+
"text": "*${alertemoji} ${alertsubject}* \n ${alertbody}"
32+
}
33+
},
34+
{
35+
"type": "divider"
36+
},
37+
{
38+
"type": "section",
39+
"fields": [
40+
{
41+
"type": "mrkdwn",
42+
"text": "*Game:* \n ${gamename}"
43+
},
44+
{
45+
"type": "mrkdwn",
46+
"text": "*Server IP:* \n ${alertip}:${port}"
47+
},
48+
{
49+
"type": "mrkdwn",
50+
"text": "*Server Name:* \n ${servername}"
51+
}
52+
]
53+
},
54+
{
55+
"type": "section",
56+
"text": {
57+
"type": "mrkdwn",
58+
"text": "Hostname: ${HOSTNAME} / More info: ${alerturl}"
59+
}
60+
}
61+
]
62+
}
63+
]
6964
}
7065
EOF
7166
)
@@ -78,6 +73,6 @@ if [ "${slacksend}" == "ok" ]; then
7873
fn_print_ok_nl "Sending Slack alert"
7974
fn_script_log_pass "Sending Slack alert"
8075
else
81-
fn_print_fail_nl "Sending Slack alert: ${slacksend}"
76+
fn_print_fail_nl "Sending Slack alert: ${slacksend}"
8277
fn_script_log_fatal "Sending Slack alert: ${slacksend}"
8378
fi

lgsm/functions/check_ip.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ if [ -n "${ip}" ]&&[ "${ip}" != "0.0.0.0" ]; then
2727
telnetip=( "${ip}" )
2828
# If game config does have an IP set.
2929
elif [ -n "${configip}" ]&&[ "${configip}" != "0.0.0.0" ];then
30-
queryips=( "${configip}" )
31-
ip="${configip}"
32-
webadminip=( "${configip}" )
33-
telnetip=( "${configip}" )
30+
queryips=( "${configip}" )
31+
ip="${configip}"
32+
webadminip=( "${configip}" )
33+
telnetip=( "${configip}" )
3434
# If there is only 1 server IP address.
3535
# Some IP details can automaticly use the one IP
3636
elif [ "${getipwc}" == "1" ]; then

lgsm/functions/command_postdetails.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ if [ ${firstcommandname} == "POST-DETAILS" ]; then
7373
echo -e "${pdurl}"
7474
fi
7575
fn_script_log_info "${pdurl}"
76+
alerturl="${pdurl}"
7677

7778
if [ -z "${exitbypass}" ]; then
7879
core_exit.sh
7980
fi
80-
alerturl="${pdurl}"

lgsm/functions/command_update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ elif [ "${shortname}" == "fctr" ]; then
2727
elif [ "${shortname}" == "mta" ]; then
2828
update_mta.sh
2929
elif [ "${shortname}" == "jk2" ]; then
30-
update_jediknight2.sh
30+
update_jediknight2.sh
3131
else
3232
update_steamcmd.sh
3333
fi

lgsm/functions/command_update_functions.sh

Whitespace-only changes.

lgsm/functions/core_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
99

10-
modulesversion="v20.4.1"
10+
modulesversion="v20.5.0"
1111

1212
# Core
1313

lgsm/functions/fix_squad.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}"
99
if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then
1010
# diff old and new config - if it is different move the old config over the new one
11-
if [ $(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l) -gt 0 ]; then
11+
if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then
1212
fixname="Migrate server config to new Game folder"
1313
fn_fix_msg_start
1414
mv -v "${oldservercfg}" "${servercfgfullpath}"

linuxgsm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
2020
set -x
2121
fi
2222

23-
version="v20.4.1"
23+
version="v20.5.0"
2424
shortname="core"
2525
gameservername="core"
2626
commandname="CORE"

0 commit comments

Comments
 (0)