Skip to content

Commit

Permalink
feat(pvrserver): add new server
Browse files Browse the repository at this point in the history
  • Loading branch information
h3o66 committed Jun 10, 2019
1 parent c4ff9c8 commit c38f09c
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 0 deletions.
133 changes: 133 additions & 0 deletions lgsm/config-default/config-lgsm/pvrserver/_default.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
##################################
######## 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="7000"

# Maps: bridge, datacenter, sand
defaultmap="datacenter"

## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="${defaultmap} -log -MultiHome=${ip} -Port=${port}"
}

#### LinuxGSM Settings ####

## Notification Alerts
# (on|off)

# 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 protected]"
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="[email protected]"
mailgunemail="[email protected]"

# 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=""

## Updating | https://docs.linuxgsm.com/commands/update
updateonstart="off"

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

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

#### LinuxGSM Advanced Settings ####

# ANSI Colors
ansi="on"

# Message Display Time
sleeptime="0.5"

## SteamCMD Settings
# Server appid
appid="622970"
# 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="Pavlov VR"
engine="unreal4"
glibc="2.17"

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

## Server Specific Directories
systemdir="${serverfiles}/Pavlov"
executabledir="${systemdir}/Binaries/Linux"
executable="./PavlovServer"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="Game.ini"
servercfgdefault="Game.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"

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

## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/Saved/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"
1 change: 1 addition & 0 deletions lgsm/data/serverlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ns,nsserver,Natural Selection
ns2,ns2server,Natural Selection 2
ns2c,ns2cserver,NS2: Combat
opfor,opforserver,Opposing Force
pvr,pvrserver,Pavlov VR
pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
pvkii,pvkiiserver,Pirates Vikings & Knights II
pc,pcserver,Project Cars
Expand Down
3 changes: 3 additions & 0 deletions lgsm/functions/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ elif [ "${shortname}" == "ns2" ]||[ "${shortname}" == "ns2c" ]; then
elif [ "${shortname}" == "st" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${shortname}" == "pvr" ];then
ramrequirementmb="2000"
ramrequirementgb="2"
fi

# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
Expand Down
8 changes: 8 additions & 0 deletions lgsm/functions/fix_steamcmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ elif [ "${shortname}" == "tu" ]; then
cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${lgsmlog}"
fn_fix_msg_end
fi
elif [ "${shortname}" == "pvr" ]; then
# Fixes: [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
if [ ! -L "${executabledir}/steamclient.so" ]; then
fixname="steamclient.so"
fn_fix_msg_start
cp -s -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${lgsmlog}"
fn_fix_msg_end
fi
fi
16 changes: 16 additions & 0 deletions lgsm/functions/info_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,20 @@ fn_info_config_mordhau(){
fi
}

fn_info_config_pavlovvr(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${unavailable}"
else
servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}')
maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}')

# Not set
servername=${servername:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
fi
}

# ARK: Survival Evolved
if [ "${shortname}" == "ark" ]; then
fn_info_config_ark
Expand Down Expand Up @@ -1324,4 +1338,6 @@ elif [ "${shortname}" == "st" ]; then
fn_info_config_stationeers
elif [ "${shortname}" == "mh" ]; then
fn_info_config_mordhau
elif [ "${shortname}" == "pvr" ];then
fn_info_config_pavlovvr
fi
12 changes: 12 additions & 0 deletions lgsm/functions/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,16 @@ fn_info_message_mordhau(){
} | column -s $'\t' -t
}

fn_info_message_pavlovvr(){
echo "netstat -atunp | grep Pavlov"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Ping\tINBOUND\t7\timcp"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}

fn_info_message_select_engine(){
# Display details depending on game or engine.
if [ "${gamename}" == "7 Days To Die" ]; then
Expand Down Expand Up @@ -1268,6 +1278,8 @@ fn_info_message_select_engine(){
fn_info_message_mta
elif [ "${gamename}" == "Mumble" ]; then
fn_info_message_mumble
elif [ "${shortname}" == "pvr" ]; then
fn_info_message_pavlovvr
elif [ "${gamename}" == "Return to Castle Wolfenstein" ]; then
fn_info_message_rtcw
elif [ "${gamename}" == "Rust" ]; then
Expand Down
7 changes: 7 additions & 0 deletions lgsm/functions/info_parms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ fn_info_parms_mordhau(){
beaconport=${beaconport:-"0"}
}

fn_info_parms_pavlovvr(){
port=${port:-"0"}
queryport=${queryport:-"0"}
}

fn_info_parms_unreal(){
defaultmap=${defaultmap:-"NOT SET"}
queryport=$((port + 1))
Expand Down Expand Up @@ -243,6 +248,8 @@ elif [ "${shortname}" == "tu" ]; then
fn_info_parms_towerunite
elif [ "${shortname}" == "mh" ]; then
fn_info_parms_mordhau
elif [ "${shortname}" == "pvr" ]; then
fn_info_parms_pavlovvr
# Unreal/Unreal 2 engine
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
fn_info_parms_unreal
Expand Down
7 changes: 7 additions & 0 deletions lgsm/functions/install_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,13 @@ elif [ "${gamename}" == "Mumble" ]; then
array_configs+=( murmur.ini )
fn_fetch_default_config
fn_default_config_remote
elif [ "${gamename}" == "Pavlov VR" ]; then
gamedirname="PavlovVR"
fn_check_cfgdir
array_configs+=( Game.ini )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then
gamedirname="PiratesVikingandKnightsII"
array_configs+=( server.cfg )
Expand Down

0 comments on commit c38f09c

Please sign in to comment.