Skip to content

Commit

Permalink
Release 20.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Sep 20, 2020
1 parent 5864379 commit 5b84fb5
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 73 deletions.
3 changes: 2 additions & 1 deletion lgsm/functions/alert_discord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/alert_rocketchat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
103 changes: 49 additions & 54 deletions lgsm/functions/alert_slack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
8 changes: 4 additions & 4 deletions lgsm/functions/check_ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/command_postdetails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
2 changes: 1 addition & 1 deletion lgsm/functions/command_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion lgsm/functions/core_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

modulesversion="v20.4.1"
modulesversion="v20.5.0"

# Core

Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/fix_squad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion linuxgsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 7 additions & 4 deletions tests/tests_defaultcfg/defaultcfg_0.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
stats
displayip
postalert
postdays
posttarget
discordalert
discordwebhook
emailalert
Expand All @@ -19,10 +17,13 @@ mailgunemail
pushbulletalert
pushbullettoken
channeltag
pushoveralert
pushovertoken
rocketchatalert
rocketchatwebhook
rocketchattoken
slackalert
slackwebhook
pushoveralert
pushovertoken
telegramalert
telegramtoken
telegramchatid
Expand All @@ -38,6 +39,8 @@ sleeptime
stopmode
querymode
querytype
consoleverbose
consoleinteract
gamename
engine
glibc
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_fctrserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_jc2server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_mcserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_ts3server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5b84fb5

Please sign in to comment.