Browse Source
* feat(btl): rename bt1944 to btl (#4124) * fix(bt1944): update binary file * feat(btl): rename bt1944 to btl * rename gameworld to worldname * rename autosaveinverval to saveinterval * rust seed * add exit code to details * update some variables * comment * update random * current refactor * modules * json * xml * add core modules to functions dir * functions * fix * use xmllint for parsing xml * check root * check logs * sdtd * quakec * changes * remove dev null * arma3 * add detect details * config origin * fix: cmw mkdir bug * ini improvements * further ini improvements * dst ini * revert * httpport * max players * source engine * fix: cannot iterate over null * fix quakec * fix(nec): no query port * more updates * more updated * more * more * telnet ip * first test of details checking * more details updates * more standardizing * comment out steamport in not set * kf2 master server true * update roserver * fix bug * looks for file called config and uses that * test test test test test * download correct configs * test test test test test test test test test test test test test test test test test test test * remove blank lines * update var names * fail * continue on error * install xmllint * adjust quakec * fix dst * fix java * re order mcb * fix query port mc * fix mom * fix pc * pc add http port * add api and http port * change naming to http from web admin * api port * http * pc2 * add query raw * list cluster config * servercfgparse * update avserver * tidy up steam ports * more servers completed * fix sb * no config file * no config file * add emserver config install * codacy * add legacy vars * add more legacy * add xmllint * mta xmllint * codacy * codacypull/4206/head
committed by
GitHub
51 changed files with 3421 additions and 2548 deletions
@ -0,0 +1,74 @@ |
|||||
|
name: Details Check |
||||
|
# This action will check that LinuxGSM is picking up game server config and parameter variables. |
||||
|
on: |
||||
|
workflow_dispatch: |
||||
|
push: |
||||
|
|
||||
|
jobs: |
||||
|
create-matrix: |
||||
|
runs-on: ubuntu-latest |
||||
|
outputs: |
||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }} |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v3 |
||||
|
|
||||
|
- name: Generate matrix with generate-matrix.sh |
||||
|
run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh |
||||
|
|
||||
|
- id: set-matrix |
||||
|
run: | |
||||
|
shortnamearray=$(cat shortnamearray.json) |
||||
|
echo "${shortnamearray}" |
||||
|
echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT |
||||
|
|
||||
|
details-check: |
||||
|
needs: create-matrix |
||||
|
continue-on-error: true |
||||
|
runs-on: ubuntu-latest |
||||
|
|
||||
|
strategy: |
||||
|
matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }} |
||||
|
|
||||
|
steps: |
||||
|
- name: Install dependencies |
||||
|
run: sudo apt-get install libxml2-utils jq |
||||
|
|
||||
|
- name: Download linuxgsm.sh |
||||
|
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/linuxgsm.sh; chmod +x linuxgsm.sh |
||||
|
|
||||
|
- name: Grab server |
||||
|
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh ${{ matrix.shortname }}server |
||||
|
|
||||
|
- name: Enable developer mode |
||||
|
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server developer |
||||
|
|
||||
|
- id: sets-servercfgname |
||||
|
name: Generate servercfgname |
||||
|
run: | |
||||
|
servercfg=$(sed -n "/^\<servercfgdefault\>/ { s/.*= *\"\?\([^\"']*\)\"\?/\1/p;q }" lgsm/config-lgsm/${{ matrix.shortname }}server/_default.cfg) |
||||
|
echo "servercfgname=$servercfg" >> "$GITHUB_OUTPUT" |
||||
|
|
||||
|
- name: Download config |
||||
|
run: | |
||||
|
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then |
||||
|
echo "This game server has no config file." |
||||
|
else |
||||
|
curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/rename/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" |
||||
|
fi |
||||
|
- name: Display config |
||||
|
run: | |
||||
|
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then |
||||
|
echo "This game server has no config file." |
||||
|
else |
||||
|
cat config |
||||
|
fi |
||||
|
|
||||
|
- name: Display parameters |
||||
|
run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg |
||||
|
|
||||
|
- name: Detect details |
||||
|
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server detect-details |
||||
|
|
||||
|
- name: Query Raw |
||||
|
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server query-raw |
@ -0,0 +1,25 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv |
||||
|
|
||||
|
echo -n "{" > "shortnamearray.json" |
||||
|
echo -n "\"include\":[" >> "shortnamearray.json" |
||||
|
|
||||
|
while read -r line; do |
||||
|
shortname=$(echo "$line" | awk -F, '{ print $1 }') |
||||
|
export shortname |
||||
|
servername=$(echo "$line" | awk -F, '{ print $2 }') |
||||
|
export servername |
||||
|
gamename=$(echo "$line" | awk -F, '{ print $3 }') |
||||
|
export gamename |
||||
|
distro=$(echo "$line" | awk -F, '{ print $4 }') |
||||
|
export distro |
||||
|
echo -n "{" >> "shortnamearray.json" |
||||
|
echo -n "\"shortname\":" >> "shortnamearray.json" |
||||
|
echo -n "\"${shortname}\"" >> "shortnamearray.json" |
||||
|
echo -n "}," >> "shortnamearray.json" |
||||
|
done < serverlist.csv |
||||
|
sed -i '$ s/.$//' "shortnamearray.json" |
||||
|
echo -n "]" >> "shortnamearray.json" |
||||
|
echo -n "}" >> "shortnamearray.json" |
||||
|
rm serverlist.csv |
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -0,0 +1,26 @@ |
|||||
|
#!/bin/bash |
||||
|
# LinuxGSM check_logs.sh module |
||||
|
# Author: Daniel Gibbs |
||||
|
# Contributors: http://linuxgsm.com/contrib |
||||
|
# Website: https://linuxgsm.com |
||||
|
# Description: Checks if log files exist. |
||||
|
|
||||
|
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
||||
|
|
||||
|
fn_check_logs() { |
||||
|
fn_print_dots "Checking for log files" |
||||
|
fn_print_info_nl "Checking for log files: Creating log files" |
||||
|
checklogs=1 |
||||
|
install_logs.sh |
||||
|
} |
||||
|
|
||||
|
# Create directories for the script and console logs. |
||||
|
if [ ! -d "${lgsmlogdir}" ] || [ ! -d "${consolelogdir}" ]; then |
||||
|
fn_check_logs |
||||
|
fi |
||||
|
|
||||
|
# Create gamelogdir. |
||||
|
# If variable exists gamelogdir exists and log/server does not. |
||||
|
if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then |
||||
|
fn_check_logs |
||||
|
fi |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
# LinuxGSM check_root.sh module |
||||
|
# Author: Daniel Gibbs |
||||
|
# Contributors: http://linuxgsm.com/contrib |
||||
|
# Website: https://linuxgsm.com |
||||
|
# Description: Checks if the user tried to run the script as root. |
||||
|
|
||||
|
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
||||
|
|
||||
|
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then |
||||
|
if [ "${commandname}" != "INSTALL" ]; then |
||||
|
fn_print_fail_nl "Do NOT run this script as root!" |
||||
|
if [ -d "${lgsmlogdir}" ]; then |
||||
|
fn_script_log_fatal "${selfname} attempted to run as root." |
||||
|
else |
||||
|
# Forces exit code is log does not yet exist. |
||||
|
exitcode=1 |
||||
|
fi |
||||
|
core_exit.sh |
||||
|
fi |
||||
|
fi |
@ -0,0 +1,816 @@ |
|||||
|
#!/bin/bash |
||||
|
# LinuxGSM core_modules.sh module |
||||
|
# Author: Daniel Gibbs |
||||
|
# Contributors: http://linuxgsm.com/contrib |
||||
|
# Website: https://linuxgsm.com |
||||
|
# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. |
||||
|
# This module is called first before any other module. Without this file other modules will not load. |
||||
|
|
||||
|
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
||||
|
|
||||
|
modulesversion="v23.2.0" |
||||
|
|
||||
|
# Core |
||||
|
|
||||
|
core_dl.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then |
||||
|
fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
else |
||||
|
fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
core_messages.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then |
||||
|
fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
else |
||||
|
fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
core_legacy.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then |
||||
|
fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
else |
||||
|
fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
core_exit.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
core_getopt.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
core_trap.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
core_steamcmd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
core_github.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Commands |
||||
|
|
||||
|
command_backup.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_console.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_debug.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_details.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_sponsor.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_postdetails.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_test_alert.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_monitor.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_start.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_stop.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_validate.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_install.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_install_resources_mta.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_squad_license.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_mods_install.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_mods_update.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_mods_remove.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_fastdl.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_ts3_server_pass.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_restart.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_skeleton.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_wipe.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_send.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Checks |
||||
|
|
||||
|
check.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_config.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_deps.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_executable.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_glibc.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_ip.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_last_update.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_logs.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_permissions.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_root.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_status.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_steamcmd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_system_dir.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_system_requirements.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_tmuxception.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
check_version.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Compress |
||||
|
|
||||
|
compress_unreal2_maps.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
compress_ut99_maps.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Mods |
||||
|
|
||||
|
mods_list.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
mods_core.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Dev |
||||
|
|
||||
|
command_dev_clear_modules.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_dev_debug.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_dev_detect_deps.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_dev_detect_glibc.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_dev_detect_ldd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_dev_query_raw.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Fix |
||||
|
|
||||
|
fix.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ark.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_av.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_arma3.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_armar.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_bt.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_bo.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_cmw.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_csgo.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_dst.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_hw.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ins.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_kf.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_kf2.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_lo.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_mcb.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_mta.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_nmrih.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_onset.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ro.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_rust.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_rw.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_sfc.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_st.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_steamcmd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_terraria.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_tf2.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ut3.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_rust.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_samp.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_sdtd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_sof2.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_squad.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ts3.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ut2k4.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_ut.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_unt.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_vh.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_wurm.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fix_zmr.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Info |
||||
|
|
||||
|
info_distro.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
info_game.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
info_messages.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
info_stats.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Alert |
||||
|
|
||||
|
alert.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_discord.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_email.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_ifttt.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_mailgun.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_pushbullet.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_pushover.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_gotify.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_telegram.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_rocketchat.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
alert_slack.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
# Logs |
||||
|
|
||||
|
core_logs.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Query |
||||
|
|
||||
|
query_gamedig.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Update |
||||
|
|
||||
|
command_update_modules.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_update_linuxgsm.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_update.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
command_check_update.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_ts3.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_minecraft.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_minecraft_bedrock.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_papermc.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_mta.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_factorio.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_jediknight2.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_steamcmd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_vintagestory.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
update_ut99.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
fn_update_modules.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# |
||||
|
## Installer modules |
||||
|
# |
||||
|
|
||||
|
fn_autoinstall() { |
||||
|
autoinstall=1 |
||||
|
command_install.sh |
||||
|
} |
||||
|
|
||||
|
install_complete.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_config.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_factorio_save.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_dst_token.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_eula.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_gsquery.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_gslt.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_header.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_logs.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_retry.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_server_dir.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
install_server_files.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_stats.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_steamcmd.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_ts3.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_ts3db.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_ut2k4.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_dl_ut2k4.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
install_ut2k4_key.sh() { |
||||
|
modulefile="${FUNCNAME[0]}" |
||||
|
fn_fetch_module |
||||
|
} |
||||
|
|
||||
|
# Calls code required for legacy servers |
||||
|
core_legacy.sh |
||||
|
|
||||
|
# Creates tmp dir if missing |
||||
|
if [ ! -d "${tmpdir}" ]; then |
||||
|
mkdir -p "${tmpdir}" |
||||
|
fi |
||||
|
|
||||
|
# Creates lock dir if missing |
||||
|
if [ ! -d "${lockdir}" ]; then |
||||
|
mkdir -p "${lockdir}" |
||||
|
fi |
||||
|
|
||||
|
# Calls on-screen messages (bootstrap) |
||||
|
core_messages.sh |
||||
|
|
||||
|
#Calls file downloader (bootstrap) |
||||
|
core_dl.sh |
||||
|
|
||||
|
# Calls the global Ctrl-C trap |
||||
|
core_trap.sh |
@ -0,0 +1,94 @@ |
|||||
|
#!/bin/bash |
||||
|
# LinuxGSM command_dev_debug.sh module |
||||
|
# Author: Daniel Gibbs |
||||
|
# Contributors: http://linuxgsm.com/contrib |
||||
|
# Website: https://linuxgsm.com |
||||
|
# Description: Dev only: Enables debugging log to be saved to dev-debug.log. |
||||
|
|
||||
|
if [ -f "config" ]; then |
||||
|
servercfgfullpath="config" |
||||
|
fi |
||||
|
if [ -f "clusterconfig" ]; then |
||||
|
clustercfgfullpath="clusterconfig" |
||||
|
fi |
||||
|
|
||||
|
info_game.sh |
||||
|
|
||||
|
carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}") |
||||
|
|
||||
|
echo -e "" |
||||
|
echo -e "${lightgreen}Server Details${default}" |
||||
|
echo -e "==================================================================" |
||||
|
echo -e "" |
||||
|
|
||||
|
echo -e "Game: ${gamename}" |
||||
|
echo -e "Config type: ${configtype}" |
||||
|
echo -e "Config file: ${servercfgfullpath}" |
||||
|
if [ -f "${clustercfgfullpath}" ]; then |
||||
|
echo -e "Cluster config file: ${clustercfgfullpath}" |
||||
|
fi |
||||
|
echo -e "Carriage Return: ${carriagereturn}" |
||||
|
|
||||
|
# Create an associative array of the server details. |
||||
|
declare -A server_details=( |
||||
|
['Admin Password']="${adminpassword}" |
||||
|
['API Port']="${apiport}" |
||||
|
['Cave']="${cave}" |
||||
|
['Cluster']="${cluster}" |
||||
|
['Config IP']="${configip}" |
||||
|
['Default Map']="${defaultmap}" |
||||
|
['Game Mode']="${gamemode}" |
||||
|
['Game Type']="${gametype}" |
||||
|
['HTTP Enabled']="${httpenabled}" |
||||
|
['HTTP IP']="${httpip}" |
||||
|
['HTTP Password']="${httppassword}" |
||||
|
['HTTP Port']="${httpport}" |
||||
|
['HTTP User']="${httpuser}" |
||||
|
['ip']="${ip}" |
||||
|
['LAN Port']="${lanport}" |
||||
|
['Master Port']="${masterport}" |
||||
|
['Master']="${master}" |
||||
|
['Maxplayers']="${maxplayers}" |
||||
|
['OldQueryPortNumber']="${oldqueryportnumber}" |
||||
|
['Port']="${port}" |
||||
|
['Query Port']="${queryport}" |
||||
|
['RCON Enabled']="${rconenabled}" |
||||
|
['RCON Password']="${rconpassword}" |
||||
|
['RCON Port']="${rconport}" |
||||
|
['Reserved Slots']="${reservedslots}" |
||||
|
['Server Password']="${serverpassword}" |
||||
|
['Servername']="${servername}" |
||||
|
['Shard']="${shard}" |
||||
|
['Sharding']="${sharding}" |
||||
|
['Steam Auth Port']="${steamauthport}" |
||||
|
['Telnet IP']="${telnetip}" |
||||
|
['Tickrate']="${tickrate}" |
||||
|
['World Name']="${worldname}" |
||||
|
['World Type']="${worldtype}" |
||||
|
) |
||||
|
|
||||
|
# Initialize a variable to keep track of missing server details. |
||||
|
missing_details="" |
||||
|
|
||||
|
# Loop through the server details and output them. |
||||
|
echo -e "" |
||||
|
echo -e "${lightgreen}Available Server Details${default}" |
||||
|
echo -e "=================================" |
||||
|
for key in "${!server_details[@]}"; do |
||||
|
value=${server_details[$key]} |
||||
|
if [ -z "$value" ]; then |
||||
|
missing_details+="\n${key}" |
||||
|
else |
||||
|
echo -e "$key: $value " |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
# Output the missing server details if there are any. |
||||
|
if [ -n "$missing_details" ]; then |
||||
|
echo -e "" |
||||
|
echo -e "${lightgreen}Missing Server Details${default}" |
||||
|
echo -e "=================================" |
||||
|
echo -e "${missing_details}" |
||||
|
fi |
||||
|
|
||||
|
core_exit.sh |
File diff suppressed because it is too large
Loading…
Reference in new issue