Browse Source

fix merge bugs

a
pull/4166/head
Daniel Gibbs 3 years ago
parent
commit
fd3a5f39c7
No known key found for this signature in database GPG Key ID: 7CA38B43F78F12FE
  1. 7
      .github/workflows/version-check.sh
  2. 14
      lgsm/modules/README.md
  3. 20
      lgsm/modules/command_monitor.sh
  4. 0
      lgsm/modules/core_functions.sh
  5. 0
      lgsm/modules/fix_armar.sh
  6. 0
      lgsm/modules/fix_bt.sh
  7. 0
      lgsm/modules/update_ut99.sh

7
.github/workflows/version-check.sh

@ -1,11 +1,6 @@
<<<<<<< HEAD
version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="')
modulesversion=$(grep "modulesversion=" lgsm/modules/core_modules.sh | sed -e 's/modulesversion//g'| tr -d '="')
=======
#!/bin/bash
version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g' | tr -d '="')
modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g' | tr -d '="')
>>>>>>> develop
modulesversion=$(grep "modulesversion=" lgsm/modules/core_modules.sh | sed -e 's/modulesversion//g' | tr -d '="')
if [ "${version}" != "${modulesversion}" ]; then
echo "Error! LinuxGSM version mismatch"

14
lgsm/modules/README.md

@ -3,19 +3,6 @@
These modules are scripts that are called upon by the primary script linuxgsm.sh
## Module Names
<<<<<<< HEAD:lgsm/modules/README.md
Modules have been named to give an idea of what the module does.
* core: Essential modules that will always run first.
* command: Primary command module.
* check: Runs checks that will either halt on or fix an issue.
* dev: development modules.
* fix: Applies a game server specific fix.
* info: retrieves information from a source such as config file or the OS.
* install: modules related to the installer.
* monitor: modules related to monitor.
* update: modules that update the game server.
=======
Modules have been named to give an idea of what the function does.
@ -28,4 +15,3 @@ Modules have been named to give an idea of what the function does.
- install: modules related to the installer.
- monitor: modules related to monitor.
- update: modules that update the game server.
>>>>>>> develop:lgsm/functions/README.md

20
lgsm/modules/command_monitor.sh

@ -26,9 +26,9 @@ fn_monitor_check_lockfile() {
# Fix if lockfile is not unix time or contains letters
if [ -f "${lockdir}/${selfname}.lock" ] && [[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
date '+%s' >"${lockdir}/${selfname}.lock"
echo "${version}" >>"${lockdir}/${selfname}.lock"
echo "${port}" >>"${lockdir}/${selfname}.lock"
fi
}
@ -83,22 +83,16 @@ fn_monitor_check_queryport() {
fi
}
<<<<<<< HEAD:lgsm/modules/command_monitor.sh
fn_query_gsquery(){
fn_query_gsquery() {
if [ ! -f "${modulesdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash"
=======
fn_query_gsquery() {
if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash"
>>>>>>> develop:lgsm/functions/command_monitor.sh
fi
"${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
"${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" >/dev/null 2>&1
querystatus="$?"
}
fn_query_tcp() {
bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' > /dev/null 2>&1
bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' >/dev/null 2>&1
querystatus="$?"
}
@ -211,7 +205,7 @@ fn_monitor_loop() {
for querymethod in "${query_methods_array[@]}"; do
# Will check if gamedig is installed and bypass if not.
if [ "${querymethod}" == "gamedig" ]; then
if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then
if [ "$(command -v gamedig 2>/dev/null)" ] && [ "$(command -v jq 2>/dev/null)" ]; then
if [ -z "${monitorpass}" ]; then
fn_monitor_query
fi

0
lgsm/functions/core_functions.sh → lgsm/modules/core_functions.sh

0
lgsm/functions/fix_armar.sh → lgsm/modules/fix_armar.sh

0
lgsm/functions/fix_bt.sh → lgsm/modules/fix_bt.sh

0
lgsm/functions/update_ut99.sh → lgsm/modules/update_ut99.sh

Loading…
Cancel
Save