Linuxgsm: [Chivalry: Medieval Warfare] Server Request

Created on 13 Jun 2015  路  20Comments  路  Source: GameServerManagers/LinuxGSM

Dedicated Linux server support was added in January! Would love to see support for this game! :smile:

Native Linux server available

issue unresolved game server request

Most helpful comment

This is as far as i got for now. Since it will be a pain, i need to delay this for later, got more important stuff to do for LGSM for now.

#!/bin/bash
# Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs
# Purpose: Chivalry: Medieval Warfare | Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki
# Website: https://gameservermanagers.com

# Debugging
if [ -f ".dev-debug" ]; then
    exec 5>dev-debug.log
    BASH_XTRACEFD="5"
    set -x
fi

version="170219"

##########################
######## Settings ########
##########################

#### Server Settings ####

## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0"
port="7777"
queryport="27960"

## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="aocffa-moor_p\?steamsockets\?port=${port}\?queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog} -seekfreeloadingserver"
}

#### LinuxGSM Settings ####

## Notification Alerts
# (on|off)
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="[email protected]"
emailfrom=""

# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""

## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
updateonstart="off"

## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"

## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
consolelogging="on"
logdays="7"

#### LinuxGSM Advanced Settings ####

## SteamCMD Settings
# Server appid
appid="220070"
# Steam App Branch Select
# Allows to opt into the various Steam app branches. Default branch is "".
# Example: "-beta latest_experimental"
branch=""

## Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"

## LinuxGSM Server Details
# Do not edit
gamename="Chivalry: Medieval Warfare"
engine="unreal3"

## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
servicename="chivalrymw-server"

#### Directories ####
# Edit with care

## Work Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
tmpdir="${lgsmdir}/tmp"
filesdir="${rootdir}/serverfiles"

## Server Specific Directories
systemdir="${filesdir}"
executabledir="${filesdir}/Binaries/Linux/"
executable="./UDKGameServer-Linux"
servercfg="PCServer-UDKGame.ini"
servercfgdefault="PCServer-UDKGame.ini"
servercfgdir="${systemdir}/UDKGame/Config"
servercfgfullpath="${servercfgdir}/${servercfg}"

## Backup Directory
backupdir="${rootdir}/backups"

## Logging Directories
gamelogdir="${rootdir}/log/server"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
gamelog="${gamelogdir}/${servicename}-game.log"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"

## Logs Naming
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"

########################
######## Script ########
###### Do not edit #####
########################

# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
    if [ ! -d "${filedir}" ]; then
        mkdir -p "${filedir}"
    fi
    echo -e "    fetching ${filename}...\c"
    # Check curl exists and use available path
    curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
    for curlcmd in ${curlpaths}
    do
        if [ -x "${curlcmd}" ]; then
            break
        fi
    done
    # If curl exists download file
    if [ "$(basename ${curlcmd})" == "curl" ]; then
        curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
        if [ $? -ne 0 ]; then
            echo -e "\e[0;31mFAIL\e[0m\n"
            echo "${curlfetch}"
            echo -e "${githuburl}\n"
            exit 1
        else
            echo -e "\e[0;32mOK\e[0m"
        fi
    else
        echo -e "\e[0;31mFAIL\e[0m\n"
        echo "Curl is not installed!"
        echo -e ""
        exit 1
    fi
    chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}

core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}

core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}

# Prevent from running this script as root.
if [ "$(whoami)" = "root" ]; then
    if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then
        echo "[ FAIL ] Do NOT run this script as root!"
        exit 1
    else
        core_functions.sh
        check_root.sh
    fi
fi

core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

All 20 comments

Sure. I can take a look. I have a few requests come in recently. But will look at adding this. I don't own the game so could do with a kind person to donate me the game so I can test the server.

Anonymous login is available, if that's what you're after

I normally prefer to have a copy of the game so I can confirm that I can connect to the server correctly and it works rather than just hoping it works :)

Looks like its on offer. I have just got myself a copy

Been trying to get the server running but unable to currently. Looks like other users are also having issues as well.

Anything I can do to help? What issues exactly? :)

I think there are some server issues that users of the Linux server are experiencing. I will be taking another look soon

https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/ChivalryMedievalWarfare/cmwserver

Im currently getting an error preventling me from starting the server. However I have uploaded what I have so far as the script does start the server

[  OK  ] Debug cmw-server: Starting debug
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
steamclient.so
with error:
steamclient.so: cannot open shared object file: No such file or directory
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local     steamclient.so.
Loading library: libPhysXCooking.so
Result of loading library libPhysXCooking.so: 0xad50780
Loading library: PhysXUpdateLoader.so
ERROR: PhysXUpdateLoader.so: cannot open shared object file: No such file or directory
Result of loading library PhysXUpdateLoader.so: 0x0
Loading library: libPhysXCore.so
Result of loading library libPhysXCore.so: 0xad50500
/home/admin/lgsm/cmwserver/functions/fn_debug: line 63: 32516 Segmentation fault          ${executable} ${parms}

I was able to narrow it a bit down, but still not functioning.
You need to copy the steamclient.so from steamcmd/linux32 to /Steam/steamapps/common/chivalry_ded_server/Binaries/Linux/lib
You also need to create a steam_appid.txt in /Binaries/Linux containing the appid:


The errors I'm getting now:

[  OK  ] Debug cmw-server: Starting debug
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 219640
Loading library: libPhysXCooking.so
Result of loading library libPhysXCooking.so: 0xb4e5500
Loading library: PhysXUpdateLoader.so
ERROR: PhysXUpdateLoader.so: cannot open shared object file: No such file or directory
Result of loading library PhysXUpdateLoader.so: 0x0
Loading library: libPhysXCore.so
Result of loading library libPhysXCore.so: 0xb4e5280
/home/cmwserver/functions/fn_debug: line 63:  5667 Segmentation fault      ${executable} ${parms}

Not sure what to do from here though!

Taken another look at this. It appears that the native server does not work well or at all. I will not be adding support for this. Maybe they will sort this out one day :(

Re-opening this for recheck.

Yep, I confirm Chivalry is available, just tested it + found an official doc: https://forums.tornbanner.com/topic/21416/native-linux-server-available

I'll do it, it's been a while since I added support for a server. :)

Started working on it... it's gonna be a pain, doc sucks.

This is as far as i got for now. Since it will be a pain, i need to delay this for later, got more important stuff to do for LGSM for now.

#!/bin/bash
# Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs
# Purpose: Chivalry: Medieval Warfare | Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki
# Website: https://gameservermanagers.com

# Debugging
if [ -f ".dev-debug" ]; then
    exec 5>dev-debug.log
    BASH_XTRACEFD="5"
    set -x
fi

version="170219"

##########################
######## Settings ########
##########################

#### Server Settings ####

## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0"
port="7777"
queryport="27960"

## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="aocffa-moor_p\?steamsockets\?port=${port}\?queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog} -seekfreeloadingserver"
}

#### LinuxGSM Settings ####

## Notification Alerts
# (on|off)
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="[email protected]"
emailfrom=""

# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""

## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
updateonstart="off"

## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"

## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
consolelogging="on"
logdays="7"

#### LinuxGSM Advanced Settings ####

## SteamCMD Settings
# Server appid
appid="220070"
# Steam App Branch Select
# Allows to opt into the various Steam app branches. Default branch is "".
# Example: "-beta latest_experimental"
branch=""

## Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"

## LinuxGSM Server Details
# Do not edit
gamename="Chivalry: Medieval Warfare"
engine="unreal3"

## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
servicename="chivalrymw-server"

#### Directories ####
# Edit with care

## Work Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
tmpdir="${lgsmdir}/tmp"
filesdir="${rootdir}/serverfiles"

## Server Specific Directories
systemdir="${filesdir}"
executabledir="${filesdir}/Binaries/Linux/"
executable="./UDKGameServer-Linux"
servercfg="PCServer-UDKGame.ini"
servercfgdefault="PCServer-UDKGame.ini"
servercfgdir="${systemdir}/UDKGame/Config"
servercfgfullpath="${servercfgdir}/${servercfg}"

## Backup Directory
backupdir="${rootdir}/backups"

## Logging Directories
gamelogdir="${rootdir}/log/server"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
gamelog="${gamelogdir}/${servicename}-game.log"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"

## Logs Naming
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"

########################
######## Script ########
###### Do not edit #####
########################

# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
    if [ ! -d "${filedir}" ]; then
        mkdir -p "${filedir}"
    fi
    echo -e "    fetching ${filename}...\c"
    # Check curl exists and use available path
    curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
    for curlcmd in ${curlpaths}
    do
        if [ -x "${curlcmd}" ]; then
            break
        fi
    done
    # If curl exists download file
    if [ "$(basename ${curlcmd})" == "curl" ]; then
        curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
        if [ $? -ne 0 ]; then
            echo -e "\e[0;31mFAIL\e[0m\n"
            echo "${curlfetch}"
            echo -e "${githuburl}\n"
            exit 1
        else
            echo -e "\e[0;32mOK\e[0m"
        fi
    else
        echo -e "\e[0;31mFAIL\e[0m\n"
        echo "Curl is not installed!"
        echo -e ""
        exit 1
    fi
    chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}

core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}

core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}

# Prevent from running this script as root.
if [ "$(whoami)" = "root" ]; then
    if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then
        echo "[ FAIL ] Do NOT run this script as root!"
        exit 1
    else
        core_functions.sh
        check_root.sh
    fi
fi

core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

Awesome game!! Hope to host it some day

+1 for development, love this game

What was the issue with the script above?

Well, the main issue is it doesn't fit LGSM modifications.
Second issue is it was way incomplete, adding a game doesn't consist in adding just one file. :p
https://github.com/GameServerManagers/LinuxGSM/wiki/Developing-LGSM

Tried again to install an run this server. Still crashes the old error. I don't believe the game developers ever did much to get this working well. I am going to close this as I dont think a stable Linux version will ever be released at this point

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings