Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cb81b45
Post Scriptum Server
Jul 19, 2018
c91ca34
Rearranged code
Jul 20, 2018
1143c94
servername missing
Jul 20, 2018
9300890
End of file error fix
Jul 20, 2018
ac02f76
Error fix again
Jul 20, 2018
744fc34
Again Same fix tryout
Jul 20, 2018
ece01ae
Error fix
Jul 20, 2018
451bbdf
Missing cfg file Fic1
Jul 21, 2018
8245f2e
Missing cfg file Fix1
Jul 21, 2018
f8e294e
Merge remote-tracking branch 'origin/master'
Jul 21, 2018
e1364ce
Missing gfg fix2
Jul 21, 2018
61812ca
Missing cfg 3
Jul 21, 2018
befdf69
Revert "Missing cfg 3"
Jul 21, 2018
c062d0f
Revert "Revert "Missing cfg 3""
Jul 21, 2018
afd3dad
Revert "Missing gfg fix2"
Jul 21, 2018
a658b74
Revert "Revert "Revert "Missing cfg 3"""
Jul 21, 2018
9c88350
Auto stash before revert of "Revert "Revert "Missing cfg 3"""
Jul 21, 2018
82e838d
Server game engine missing
Jul 21, 2018
1a225d9
Game engine missing fix2
Jul 21, 2018
566be7b
Typo fix
Jul 21, 2018
7c70a3a
Param fix
Jul 21, 2018
db154a0
Cleaning default.cfg
Jul 21, 2018
4c76a28
Revert "Cleaning default.cfg"
Jul 21, 2018
6c24017
Testing params
Jul 21, 2018
39ffaa8
Params fix1
Jul 21, 2018
6b0926e
Typo
Jul 21, 2018
1771796
Param fix 2
Jul 21, 2018
964975a
Param fix 3
Jul 21, 2018
81d6730
Fixed to 2
Jul 21, 2018
0f7ceb3
Param fix4
Jul 21, 2018
e30330b
Remove servername modifying
Jul 21, 2018
5bc8a45
Cleaning config params
Jul 21, 2018
d17f7c5
Revert "Cleaning config params"
Jul 21, 2018
06b1659
Testing 1
Jul 22, 2018
767f08f
Merge pull request #1942 from Troopie/master
dgibbs64 Jul 22, 2018
ff56bb0
added minimum ram requirements for pstbs
dgibbs64 Jul 22, 2018
0d394e8
correction required 2G
dgibbs64 Jul 22, 2018
621d41f
corrected missing servername
dgibbs64 Jul 22, 2018
95cf289
updated glibc version
dgibbs64 Jul 22, 2018
bf0ce40
shortname
dgibbs64 Jul 22, 2018
83dae2c
moved engine to the top.
dgibbs64 Jul 22, 2018
4e0af4b
Revert "moved engine to the top."
dgibbs64 Jul 22, 2018
f3aea98
Fixed bug displaying wrong glibc version
dgibbs64 Jul 22, 2018
b503808
corrected netstat
dgibbs64 Jul 22, 2018
0e033f2
resolved confusion with glibc steamcmd selection
dgibbs64 Jul 22, 2018
79c33c6
changed a word
dgibbs64 Jul 22, 2018
362bb72
missing nl
dgibbs64 Jul 22, 2018
3aee279
updated appid
dgibbs64 Aug 10, 2018
ad4fb8c
remove line
dgibbs64 Aug 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
##################################
######## 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://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters

ip="0.0.0.0"
randommap="ALWAYS"
port="10027"
queryport="10037"
#servername="LinuxGSM server"
# If your server is not meeting the minimal server requirement, do not host the server for 80 players, decrease that number.
maxplayers="40"
numreservedslots="2"

## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="MULTIHOME=${ip}?RANDOM=${randommap}?Port=${port}?QueryPort=${queryport}?MaxPlayers=${maxplayers}?NumReservedSlots=${numreservedslots}"
}

#### LinuxGSM Settings ####

## Notification Alerts
# (on|off)

# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"

# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord
discordalert="off"
discordwebhook="webhook"

# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="email@example.com"
emailfrom=""

# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"

# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun
mailgunalert="off"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="alert@example.com"
mailgunemail="email@myemail.com"

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

# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover
pushoveralert="off"
pushovertoken="accesstoken"

# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/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=""

## 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="746200"
# Steam App Branch Select
# Allows to opt into the various Steam app branches. Default branch is "".
# Example: "-beta latest_experimental"
branch=""

## LinuxGSM Server Details
# Do not edit
gamename="pstbsserver"
engine="unreal4"

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

## Server Specific Directories
systemdir="${serverfiles}/PostScriptum"
executabledir="${serverfiles}"
executable="./PostScriptumServer.sh"
servercfg="Server.cfg"
servercfgdefault="Server.cfg"
servercfgdir="${systemdir}/ServerConfig"
servercfgfullpath="${servercfgdir}/${servercfg}"

## Backup Directory
backupdir="${lgsmdir}/backup"

## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/Saved/Logs"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
gamelog="${gamelogdir}/${servicename}-game.log"
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"
1 change: 1 addition & 0 deletions lgsm/data/serverlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ns,nsserver,Natural Selection
ns2,ns2server,Natural Selection 2
ns2c,ns2cserver,NS2: Combat
opfor,opforserver,Opposing Force
pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
pvkii,pvkiiserver,Pirates Vikings & Knights II
pc,pcserver,Project Cars
pz,pzserver,Project Zomboid
Expand Down
13 changes: 8 additions & 5 deletions lgsm/functions/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ info_distro.sh

# RAM requirements in megabytes for each game or engine.

if [ "${gamename}" == "ARK: Survival Evolved" ]; then
if [ "${shortname}" == "ark" ]; then
ramrequirementmb="4000"
ramrequirementgb="4"
elif [ "${gamename}" == "ARMA 3" ]; then
elif [ "${shortname}" == "arma3" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${gamename}" == "Rust" ]; then
elif [ "${shortname}" == "rust" ]; then
ramrequirementmb="4000"
ramrequirementgb="4"
elif [ "${gamename}" == "Minecraft" ]; then
elif [ "${shortname}" == "mc" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${gamename}" == "Natural Selection 2" ]||[ "${gamename}" == "NS2: Combat" ]; then
elif [ "${shortname}" == "pstbs" ]; then
ramrequirementmb="2000"
ramrequirementgb="2"
elif [ "${shortname}" == "ns2" ]||[ "${shortname}" == "ns2c" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${shortname}" == "st" ]; then
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/command_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [ -n "${glibcrequired}" ]; then
if [ "${glibcfix}" == "yes" ]; then
echo -e "${blue}GLIBC required:\t${red}${glibcrequired} ${default}(${green}Using GLIBC fix${default})"
else
echo -e "${blue}GLIBC required:\t${red}${glibcrequired} ${default}(${red}GLIBC version too old${default})"
echo -e "${blue}GLIBC required:\t${red}${glibcrequired} ${default}(${red}GLIBC distro version ${glibcversion} too old${default})"
fi
else
echo -e "${blue}GLIBC required:\t${green}${glibcrequired}${default}"
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
elif [ "${gamename}" == "Unreal Tournament 3" ]; then
fix_ut3.sh
else
fn_print_information "No fixes required."
fn_print_information_nl "No fixes required."
fi

fi
35 changes: 34 additions & 1 deletion lgsm/functions/info_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,36 @@ fn_info_config_minecraft(){
fi
}

#Post Scriptum: The bloody Seventh
fn_info_config_pstbs(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${unavailable}"
numreservedslots="${unavailable}"
else
servername="$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//')"
maxplayers="$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')"
numreservedslots="$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]')"
fi

if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then
rconport=${unavailable}
rconpassword=${unavailable}
else
rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]')
rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
fi

rconport=${rconport:-"0"}
if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then
rconpassword="NOT SET"
fi
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
numreservedslots=${maxplayers:-"0"}
}

fn_info_config_projectcars(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
Expand Down Expand Up @@ -1078,6 +1108,9 @@ elif [ "${gamename}" == "Quake Live" ]; then
# Minecraft
elif [ "${engine}" == "lwjgl2" ]; then
fn_info_config_minecraft
# Post Scriptum: The Bloody Seventh
elif [ "${shortname}" == "pstbs" ]; then
fn_info_config_pstbs
# Project Cars
elif [ "${gamename}" == "Project Cars" ]; then
fn_info_config_projectcars
Expand Down Expand Up @@ -1137,4 +1170,4 @@ elif [ "${gamename}" == "Squad" ]; then
# Stationeers
elif [ "${gamename}" == "Stationeers" ]; then
fn_info_config_stationeers
fi
fi
5 changes: 4 additions & 1 deletion lgsm/functions/info_glibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ elif [ "${gamename}" == "Project Cars" ]; then
elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then
glibcrequired="2.15"
glibcfix="yes"
elif [ "${shortname}" == "pstbs" ]; then
glibcrequired="2.17"
glibcfix="no"
elif [ "${gamename}" == "Quake 2" ]; then
glibcrequired="NOT REQUIRED"
glibcfix="no"
Expand Down Expand Up @@ -205,7 +208,7 @@ fi

# Sets the SteamCMD GLIBC requirement if the game server requirement is less or not required.
if [ -n "${appid}" ]; then
if [ "${glibcrequired}" = "NOT REQUIRED" ]||[ -z "${glibcrequired}" ]||[ "$(printf '%s\n'${glibcrequired}'\n' "${glibcversion}" | sort -V | head -n 1)" != "2.14" ]; then
if [ "${glibcrequired}" = "NOT REQUIRED" ]||[ -z "${glibcrequired}" ]||[ "$(printf '%s\n'${glibcrequired}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then
glibcrequired="2.14"
glibcfix="no"
fi
Expand Down
14 changes: 13 additions & 1 deletion lgsm/functions/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ fn_info_message_gameserver(){
echo -e "${blue}ASE:\t${default}${saveinterval} s"
fi

# Random map rotation mode (Squad)
# Random map rotation mode (Squad and Post Scriptum)
if [ -n "${randommap}" ]; then
echo -e "${blue}Map rotation:\t${default}${randommap}"
fi
Expand Down Expand Up @@ -693,6 +693,16 @@ fn_info_message_mumble(){
echo -e "> ServerQuery\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t
}
fn_info_Message_pstbs(){
echo -e "netstat -atunp | grep PostScriptum"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
} | column -s $'\t' -t
}

fn_info_message_projectcars(){
echo -e "netstat -atunp | grep DedicatedS"
Expand Down Expand Up @@ -1106,6 +1116,8 @@ fn_info_message_select_engine(){
fn_info_message_justcause3
elif [ "${shortname}" == "kf2" ]; then
fn_info_message_kf2
elif [ "${shortname}" == "pstbs" ]; then
fn_info_Message_pstbs
elif [ "${gamename}" == "Project Cars" ]; then
fn_info_message_projectcars
elif [ "${gamename}" == "QuakeWorld" ]; then
Expand Down