Browse Source

Added Valheim _default.cfg

Added Valheim to serverlistmenu.csv
Added Valheim specific stop command
pull/3020/head
Alasdair Haig 5 years ago
parent
commit
5165cfee69
  1. 170
      lgsm/config-default/config-lgsm/vhserver/_default.cfg
  2. 107
      lgsm/data/serverlistmenu.csv
  3. 23
      lgsm/functions/command_stop.sh
  4. 2
      linuxgsm.sh

170
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@ -0,0 +1,170 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT, ANY CHANGES 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.
#### Game Server Settings ####
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
name="Valheim Server"
password=""
port="2456"
world="World"
# 1 is true, 0 is false, whether server is public
public="1"
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="-name ${name} -password ${password} -port ${port} -world ${world} -public ${public}"
}
#### LinuxGSM Settings ####
## LinuxGSM Stats
# Send useful stats to LinuxGSM developers.
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
# (on|off)
stats="off"
## 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://termbin.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"
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
slackalert="off"
slackwebhook="webhook"
# 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="off"
## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"
## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
querydelay="5"
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
ansi="on"
#### Advanced Settings ####
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
sleeptime="0.5"
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
# Server appid
appid="896660"
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
branch=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill
# 2: CTRL+c
# 3: quit
# 4: quit 120s
# 5: stop
# 6: q
# 7: exit
# 8: 7 Days to Die
# 9: GoldSrc
# 10: Avorion
# 11: Valheim
stopmode="11"
## Query mode
# 1: session only
# 2: gamedig + gsquery
# 3: gamedig
# 4: gsquery
# 5: tcp
querymode="2"
querytype="protocol-valve"
## Game Server Details
# Do not edit
gamename="Valheim"
engine="unity3d"
glibc="2.15"
#### Directories ####
# Edit with care
## Game Server Directories
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable="./valheim_server.x86_64"
## Backup Directory
backupdir="${lgsmdir}/backup"
## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/Saved/Logs"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
consolelog="${consolelogdir}/${selfname}-console.log"
alertlog="${lgsmlogdir}/${selfname}-alert.log"
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
## Logs Naming
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

107
lgsm/data/serverlistmenu.csv

@ -0,0 +1,107 @@
ahl,ahlserver,Action half-life
ahl2,ahl2server,Action: Source
ark,arkserver,ARK: Survival Evolved
arma3,arma3server,ARMA 3
av,avserver,Avorion
bb,bbserver,BrainBread
bb2,bb2server,BrainBread 2
bd,bdserver,Base Defense
bf1942,bf1942server,Battlefield 1942
bmdm,bmdmserver,Black Mesa: Deathmatch
bo,boserver,Ballistic Overkill
bs,bsserver,Blade Symphony
bt,btserver,Barotrauma
bt1944,bt1944server,Battalion 1944
cc,ccserver,Codename CURE
cmw,cmwserver,Chivalry: Medieval Warfare
cod,codserver,Call of Duty
cod2,cod2server,Call of Duty 2
cod4,cod4server,Call of Duty 4
coduo,coduoserver,Call of Duty: United Offensive
codwaw,codwawserver,Call of Duty: World at War
cs,csserver,Counter-Strike 1.6
cscz,csczserver,Counter-Strike: Condition Zero
csgo,csgoserver,Counter-Strike: Global Offensive
css,cssserver,Counter-Strike: Source
dab,dabserver,Double Action: Boogaloo
dmc,dmcserver,Deathmatch Classic
dod,dodserver,Day of Defeat
dods,dodsserver,Day of Defeat: Source
doi,doiserver,Day of Infamy
dst,dstserver,Don't Starve Together
dys,dysserver,Dystopia
eco,ecoserver,Eco
em,emserver,Empires Mod
etl,etlserver,ET: Legacy
fctr,fctrserver,Factorio
fof,fofserver,Fistful of Frags
ges,gesserver,GoldenEye: Source
gmod,gmodserver,Garrys Mod
hl2dm,hl2dmserver,Half-Life 2: Deathmatch
hldm,hldmserver,Half-Life: Deathmatch
hldms,hldmsserver,Half-Life Deathmatch: Source
hw,hwserver,Hurtworld
ins,insserver,Insurgency
inss,inssserver,Insurgency: Sandstorm
ios,iosserver,IOSoccer
jc2,jc2server,Just Cause 2
jc3,jc3server,Just Cause 3
kf,kfserver,Killing Floor
kf2,kf2server,Killing Floor 2
l4d,l4dserver,Left 4 Dead
l4d2,l4d2server,Left 4 Dead 2
mc,mcserver,Minecraft
mcb,mcbserver,Minecraft Bedrock
mh,mhserver,MORDHAU
mohaa,mohaaserver,Medal of Honor: Allied Assault
mta,mtaserver,Multi Theft Auto
mumble,mumbleserver,Mumble
nd,ndserver,Nuclear Dawn
nmrih,nmrihserver,No More Room in Hell
ns,nsserver,Natural Selection
ns2,ns2server,Natural Selection 2
ns2c,ns2cserver,NS2: Combat
onset,onsetserver,Onset
opfor,opforserver,Opposing Force
pc,pcserver,Project Cars
pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
pvkii,pvkiiserver,Pirates Vikings & Knights II
pz,pzserver,Project Zomboid
q2,q2server,Quake 2
q3,q3server,Quake 3: Arena
ql,qlserver,Quake Live
qw,qwserver,Quake World
ricochet,ricochetserver,Ricochet
ro,roserver,Red Orchestra: Ostfront 41-45
rtcw,rtcwserver,Return to Castle Wolfenstein
rust,rustserver,Rust
rw,rwserver,Rising World
samp,sampserver,San Andreas Multiplayer
sb,sbserver,Starbound
sbots,sbotsserver,StickyBots
sdtd,sdtdserver,7 Days to Die
sfc,sfcserver,SourceForts Classic
sof2,sof2server,Soldier Of Fortune 2: Gold Edition
sol,solserver,Soldat
squad,squadserver,Squad
ss3,ss3server,Serious Sam 3: BFE
st,stserver,Stationeers
sven,svenserver,Sven Co-op
terraria,terrariaserver,Terraria
tf2,tf2server,Team Fortress 2
tfc,tfcserver,Team Fortress Classic
ts,tsserver,The Specialists
ts3,ts3server,Teamspeak 3
tu,tuserver,Tower Unite
tw,twserver,Teeworlds
unt,untserver,Unturned
ut,utserver,Unreal Tournament
ut2k4,ut2k4server,Unreal Tournament 2004
ut3,ut3server,Unreal Tournament 3
ut99,ut99server,Unreal Tournament 99
vs,vsserver,Vampire Slayer
wet,wetserver,Wolfenstein: Enemy Territory
wf,wfserver,Warfork
wurm,wurmserver,Wurm Unlimited
zmr,zmrserver,Zombie Master: Reborn
zps,zpsserver,Zombie Panic! Source
1 ahl ahlserver Action half-life
2 ahl2 ahl2server Action: Source
3 ark arkserver ARK: Survival Evolved
4 arma3 arma3server ARMA 3
5 av avserver Avorion
6 bb bbserver BrainBread
7 bb2 bb2server BrainBread 2
8 bd bdserver Base Defense
9 bf1942 bf1942server Battlefield 1942
10 bmdm bmdmserver Black Mesa: Deathmatch
11 bo boserver Ballistic Overkill
12 bs bsserver Blade Symphony
13 bt btserver Barotrauma
14 bt1944 bt1944server Battalion 1944
15 cc ccserver Codename CURE
16 cmw cmwserver Chivalry: Medieval Warfare
17 cod codserver Call of Duty
18 cod2 cod2server Call of Duty 2
19 cod4 cod4server Call of Duty 4
20 coduo coduoserver Call of Duty: United Offensive
21 codwaw codwawserver Call of Duty: World at War
22 cs csserver Counter-Strike 1.6
23 cscz csczserver Counter-Strike: Condition Zero
24 csgo csgoserver Counter-Strike: Global Offensive
25 css cssserver Counter-Strike: Source
26 dab dabserver Double Action: Boogaloo
27 dmc dmcserver Deathmatch Classic
28 dod dodserver Day of Defeat
29 dods dodsserver Day of Defeat: Source
30 doi doiserver Day of Infamy
31 dst dstserver Don't Starve Together
32 dys dysserver Dystopia
33 eco ecoserver Eco
34 em emserver Empires Mod
35 etl etlserver ET: Legacy
36 fctr fctrserver Factorio
37 fof fofserver Fistful of Frags
38 ges gesserver GoldenEye: Source
39 gmod gmodserver Garrys Mod
40 hl2dm hl2dmserver Half-Life 2: Deathmatch
41 hldm hldmserver Half-Life: Deathmatch
42 hldms hldmsserver Half-Life Deathmatch: Source
43 hw hwserver Hurtworld
44 ins insserver Insurgency
45 inss inssserver Insurgency: Sandstorm
46 ios iosserver IOSoccer
47 jc2 jc2server Just Cause 2
48 jc3 jc3server Just Cause 3
49 kf kfserver Killing Floor
50 kf2 kf2server Killing Floor 2
51 l4d l4dserver Left 4 Dead
52 l4d2 l4d2server Left 4 Dead 2
53 mc mcserver Minecraft
54 mcb mcbserver Minecraft Bedrock
55 mh mhserver MORDHAU
56 mohaa mohaaserver Medal of Honor: Allied Assault
57 mta mtaserver Multi Theft Auto
58 mumble mumbleserver Mumble
59 nd ndserver Nuclear Dawn
60 nmrih nmrihserver No More Room in Hell
61 ns nsserver Natural Selection
62 ns2 ns2server Natural Selection 2
63 ns2c ns2cserver NS2: Combat
64 onset onsetserver Onset
65 opfor opforserver Opposing Force
66 pc pcserver Project C

23
lgsm/functions/command_stop.sh

@ -207,6 +207,27 @@ fn_stop_graceful_avorion(){
fi
}
# Attempts graceful shutdown of valheim using the developer's
# custom half-baked shutdown procedure. Up till now, the game does
# not support any signals.
fn_stop_graceful_valheim(){
fn_print_dots "Graceful: echo 1 to server_exit.drp"
fn_script_log_info "Graceful: echo 1 to server_exit.drp"
# sends quit
/bin/echo 1 > /home/steam/servers/valheim/server_exit.drp
# Animate dots for shutdown period
for seconds in {1..10}; do
sleep 1
fn_print_dots "Graceful: echo 1 to server_exit.drp: ${seconds}"
done
fn_print_ok "Graceful: echo 1 to server_exit.drp: ${seconds}: "
fn_print_ok_eol_nl
fn_script_log_pass "Graceful: echo 1 to server_exit.drp: OK: ${seconds} seconds"
}
fn_stop_graceful_select(){
if [ "${stopmode}" == "1" ]; then
fn_stop_tmux
@ -228,6 +249,8 @@ fn_stop_graceful_select(){
fn_stop_graceful_goldsrc
elif [ "${stopmode}" == "10" ]; then
fn_stop_graceful_avorion
elif [ "${stopmode}" == "11" ]; then
fn_stop_graceful_valheim
fi
}

2
linuxgsm.sh

@ -46,7 +46,7 @@ userinput="${1}"
## GitHub Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubuser="AlasdairHaig"
githubrepo="LinuxGSM"
githubbranch="master"

Loading…
Cancel
Save