Skip to content
Permalink
Browse files

feat(newserver): Soldat (#2445)

Co-authored-by: Christian Birk <chris.h3o66@gmail.com>
  • Loading branch information...
h3o66 authored and dgibbs64 committed Aug 25, 2019
1 parent 6761e50 commit bcd585bae9330f1757e7b4e6fc7e091591b96c6d
@@ -0,0 +1,127 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT WILL BE OVERWRITTEN!
# Copy settings from here and use them in either
# common.cfg - applies settings to every instance
# [instance].cfg - applies settings to a specific instance

#### Server Settings ####

## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
ip="0.0.0.0"
port="23073"
maxplayers="32"
maplist="mapslist.txt"

## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="-b ${ip} -p ${port} -l ${maxplayers} -m ${maplist} -c ${servercfg}"
}

#### LinuxGSM Settings ####

## Notification Alerts
# (on|off)

# Display IP | https://docs.linuxgsm.com/alerts#display-ip
displayip=""

# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"

# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
discordwebhook="webhook"

# Email Alerts | https://docs.linuxgsm.com/alerts/email
emailalert="off"
email="email@example.com"
emailfrom=""

# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"

# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
mailgunalert="off"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="alert@example.com"
mailgunemail="email@myemail.com"

# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""

# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
pushoveralert="off"
pushovertoken="accesstoken"

# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
# any custom string in curl - simple ignore this parameter.
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
curlcustomstring=""

## Backup | https://docs.linuxgsm.com/commands/backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"

## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"

## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
querydelay="1"

#### LinuxGSM Advanced Settings ####

# ANSI Colors
ansi="on"

# Message Display Time
sleeptime="0.5"

## LinuxGSM Server Details
# Do not edit
gamename="Soldat"
engine="soldat"
glibc="2.1"

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

## Server Specific Directories
systemdir="${serverfiles}"
executabledir="${systemdir}"
executable="./soldatserver"
servercfg="soldat.ini"
servercfgdir="${systemdir}"
servercfgfullpath="${servercfgdir}/${servercfg}"

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

## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${serverfiles}/logs"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
lgsmlog="${lgsmlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
alertlog="${lgsmlogdir}/${servicename}-alert.log"
postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"

## Logs Naming
lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
@@ -74,6 +74,7 @@ samp,sampserver,San Andreas Multiplayer
sbots,sbotsserver, StickyBots
sfc,sfcserver,SourceForts Classic
sof2,sof2server,Soldier Of Fortune 2: Gold Edition
sol,solserver,Soldat
ss3,ss3server,Serious Sam 3: BFE
sb,sbserver,Starbound
st,stserver,Stationeers
@@ -176,7 +176,7 @@ fn_monitor_query_tcp(){
fn_monitor_loop
}

fn_monitor_query_upd(){
fn_monitor_query_udp(){
querymethod="upd"
fn_monitor_loop
}
@@ -195,7 +195,7 @@ fn_stop_graceful_select(){
fn_stop_graceful_cmd "quit" 120
elif [ "${engine}" == "goldsource" ]; then
fn_stop_graceful_goldsource
elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]; then
elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]||[ "${shortname}" == "sol" ]; then
fn_stop_graceful_ctrlc
elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then
fn_stop_graceful_cmd "quit" 30
@@ -1212,6 +1212,18 @@ fn_info_config_mordhau(){
fi
}

fn_info_config_soldat(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
adminpassword="${unavailable}"
else
servername=$(grep "Server_Name" "${servercfgfullpath}" | awk -F '=' '{print $2}')
serverpassword=$(grep "Game_Password" "${servercfgfullpath}" | awk -F '=' '{print $2}')
adminpassword=$(grep "Admin_Password" "${servercfgfullpath}" | awk -F '=' '{print $2}')
fi
}

# ARK: Survival Evolved
if [ "${shortname}" == "ark" ]; then
fn_info_config_ark
@@ -1296,6 +1308,9 @@ elif [ "${shortname}" == "rw" ]; then
# Serious Sam
elif [ "${shortname}" == "ss3" ]; then
fn_info_config_seriousengine35
# Soldat
elif [ "${shortname}" == "sol" ]; then
fn_info_config_soldat
# Soldier Of Fortune 2: Gold Edition
elif [ "${shortname}" == "sof2" ]; then
fn_info_config_sof2
@@ -501,7 +501,7 @@ fn_info_message_ports(){
fi
done
# engines/games that require editing the parms
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned")
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" )
for port_edit in "${ports_edit_array[@]}"
do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then
@@ -1215,6 +1215,16 @@ fn_info_message_barotrauma(){
} | column -s $'\t' -t
}

fn_info_message_soldat() {
echo "netstat -atunp | grep soldat"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> RCON\tINBOUND\t${port}\ttcp"
echo -e "> FILES\tINBOUND\t$((port+10))\ttcp"
} | column -s $'\t' -t
}

fn_info_message_select_engine(){
# Display details depending on game or engine.
@@ -1272,6 +1282,8 @@ fn_info_message_select_engine(){
fn_info_message_squad
elif [ "${gamename}" == "Stationeers" ]; then
fn_info_message_stationeers
elif [ "${shortname}" == "sol" ]; then
fn_info_message_soldat
elif [ "${shortname}" == "sbots" ]; then
fn_info_message_sbots
elif [ "${gamename}" == "TeamSpeak 3" ]; then
@@ -157,6 +157,15 @@ fn_info_parms_sof2(){
defaultmap=${defaultmap:-"NOT SET"}
}

fn_info_parms_soldat(){
port=${port:-"0"}
queryport=${port}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
}

fn_info_parms_towerunite(){
port=${port:-"0"}
queryport=${queryport:-"0"}
@@ -239,6 +248,8 @@ elif [ "${shortname}" == "sof2" ]; then
# Sticky Bots
elif [ "${shortname}" == "sbots" ]; then
fn_info_parms_stickybots
elif [ "${shortname}" == "sol" ]; then
fn_info_parms_soldat
# Serious Sam
elif [ "${shortname}" == "ss3" ]; then
fn_info_parms_seriousengine35
@@ -555,6 +555,12 @@ elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Soldat" ]; then
gamedirname="Soldat"
array_configs+=( soldat.ini )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Soldier Of Fortune 2: Gold Edition" ]; then
gamedirname="SoldierOfFortune2Gold"
array_configs+=( server.cfg mapcycle.txt)
@@ -59,6 +59,8 @@ fn_install_server_files(){
remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7"
elif [ "${shortname}" == "samp" ]; then
remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4"
elif [ "${shortname}" == "sol" ]; then
remote_fileurl="https://static.soldat.pl/downloads/soldatserver2.8.1_1.7.1.zip"; local_filedir="${tmpdir}"; local_filename="soldatserver2.8.1_1.7.1.zip"; chmodx="nochmodx" run="norun"; force="noforce"; md5="994409c28520425965dec5c71ccb55e1"
elif [ "${shortname}" == "zmr" ]; then
remote_fileurl="https://files.linuxgsm.com/ZombieMasterReborn/zombie_master_reborn_b4_fix5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b4_fix5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="73472bd84dfa6d203f3b5f48f760773e"
fi
@@ -159,7 +161,7 @@ elif [ "${shortname}" == "mta" ]; then
elif [ "${shortname}" == "fctr" ]; then
update_factorio.sh
install_factorio_save.sh
elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then
elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "sol" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then
if [ "${shortname}" == "ut" ]; then
install_eula.sh
fi

0 comments on commit bcd585b

Please sign in to comment.
You can’t perform that action at this time.