Browse Source

Post Scriptum (#1981)

* [Server Request] Postscriptum #1911 
* Altered check_system_requirements.sh to use shortname
* Changed wording of Glibc Required in debug
* Rearranged code
* fixed steamcmd glibc detection
pull/1987/head
Daniel Gibbs 7 years ago
committed by GitHub
parent
commit
6e778e856e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 131
      lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
  2. 1
      lgsm/data/serverlist.csv
  3. 13
      lgsm/functions/check_system_requirements.sh
  4. 2
      lgsm/functions/command_debug.sh
  5. 2
      lgsm/functions/fix.sh
  6. 35
      lgsm/functions/info_config.sh
  7. 5
      lgsm/functions/info_glibc.sh
  8. 14
      lgsm/functions/info_messages.sh

131
lgsm/config-default/config-lgsm/pstbsserver/_default.cfg

@ -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
lgsm/data/serverlist.csv

@ -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

1 arma3 arma3server ARMA 3
50 ns2 ns2server Natural Selection 2
51 ns2c ns2cserver NS2: Combat
52 opfor opforserver Opposing Force
53 pstbs pstbsserver Post Scriptum: The Bloody Seventh
54 pvkii pvkiiserver Pirates Vikings & Knights II
55 pc pcserver Project Cars
56 pz pzserver Project Zomboid

13
lgsm/functions/check_system_requirements.sh

@ -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

2
lgsm/functions/command_debug.sh

@ -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}"

2
lgsm/functions/fix.sh

@ -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
lgsm/functions/info_config.sh

@ -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}"
@ -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
@ -1137,4 +1170,4 @@ elif [ "${gamename}" == "Squad" ]; then
# Stationeers
elif [ "${gamename}" == "Stationeers" ]; then
fn_info_config_stationeers
fi
fi

5
lgsm/functions/info_glibc.sh

@ -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"
@ -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

14
lgsm/functions/info_messages.sh

@ -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
@ -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"
@ -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

Loading…
Cancel
Save