Browse Source

code tidy

pull/2384/head
Daniel Gibbs 4 years ago
parent
commit
a62d9236a3
  1. 2
      lgsm/functions/fix_squad.sh
  2. 2
      lgsm/functions/query_gamedig.sh

2
lgsm/functions/fix_squad.sh

@ -6,7 +6,7 @@
# As the server base dir changed for the game, we need to migrate the default config from the old to the new location # As the server base dir changed for the game, we need to migrate the default config from the old to the new location
oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}"
if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then if [ -f "${oldservercfg}" ]&&[ -f "${servercfgfullpath}" ]; then
# diff old and new config - if it is different move the old config over the new one # 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" fixname="Migrate server config to new Game folder"

2
lgsm/functions/query_gamedig.sh

@ -38,7 +38,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
fi fi
if [ "${gdplayers}" == "null" ]; then if [ "${gdplayers}" == "null" ]; then
unset gdplayers unset gdplayers
elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then elif [ "${gdplayers}" == "[]" ]||[ "${gdplayers}" == "-1" ]; then
gdplayers=0 gdplayers=0
fi fi

Loading…
Cancel
Save