Skip to content

Commit 9a85063

Browse files
authored
feat(newserver): Colony Survival (#3075)
1 parent d0ecddf commit 9a85063

File tree

7 files changed

+232
-1
lines changed

7 files changed

+232
-1
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
##################################
2+
######## Default Settings ########
3+
##################################
4+
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
5+
# Copy settings from here and use them in either:
6+
# common.cfg - applies settings to every instance.
7+
# [instance].cfg - applies settings to a specific instance.
8+
9+
#### Game Server Settings ####
10+
11+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
12+
# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29
13+
fn_parms(){
14+
parms="-batchmode -nographics +server.config ${servercfgfullpath}"
15+
}
16+
17+
#### LinuxGSM Settings ####
18+
19+
## LinuxGSM Stats
20+
# Send useful stats to LinuxGSM developers.
21+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
22+
# (on|off)
23+
stats="off"
24+
25+
## Notification Alerts
26+
# (on|off)
27+
28+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
29+
displayip=""
30+
31+
# More info | https://docs.linuxgsm.com/alerts#more-info
32+
postalert="off"
33+
34+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
35+
discordalert="off"
36+
discordwebhook="webhook"
37+
38+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
39+
emailalert="off"
40+
41+
emailfrom=""
42+
43+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
44+
iftttalert="off"
45+
ifttttoken="accesstoken"
46+
iftttevent="linuxgsm_alert"
47+
48+
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
49+
mailgunalert="off"
50+
mailgunapiregion="us"
51+
mailguntoken="accesstoken"
52+
mailgundomain="example.com"
53+
mailgunemailfrom="[email protected]"
54+
mailgunemail="[email protected]"
55+
56+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
57+
pushbulletalert="off"
58+
pushbullettoken="accesstoken"
59+
channeltag=""
60+
61+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
62+
pushoveralert="off"
63+
pushovertoken="accesstoken"
64+
pushoveruserkey="userkey"
65+
66+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
67+
rocketchatalert="off"
68+
rocketchatwebhook="webhook"
69+
rocketchattoken=""
70+
71+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
72+
slackalert="off"
73+
slackwebhook="webhook"
74+
75+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
76+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
77+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
78+
telegramalert="off"
79+
telegramtoken="accesstoken"
80+
telegramchatid=""
81+
curlcustomstring=""
82+
83+
## Updating | https://docs.linuxgsm.com/commands/update
84+
updateonstart="off"
85+
86+
## Backup | https://docs.linuxgsm.com/commands/backup
87+
maxbackups="4"
88+
maxbackupdays="30"
89+
stoponbackup="on"
90+
91+
## Logging | https://docs.linuxgsm.com/features/logging
92+
consolelogging="on"
93+
logdays="7"
94+
95+
## Monitor | https://docs.linuxgsm.com/commands/monitor
96+
# Query delay time
97+
querydelay="1"
98+
99+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
100+
ansi="on"
101+
102+
#### Advanced Settings ####
103+
104+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
105+
sleeptime="0.5"
106+
107+
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
108+
# Server appid
109+
appid="748090"
110+
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
111+
branch=""
112+
betapassword=""
113+
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
114+
steammaster="false"
115+
116+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
117+
# 1: tmux kill
118+
# 2: CTRL+c
119+
# 3: quit
120+
# 4: quit 120s
121+
# 5: stop
122+
# 6: q
123+
# 7: exit
124+
# 8: 7 Days to Die
125+
# 9: GoldSrc
126+
# 10: Avorion
127+
# 11: end
128+
stopmode="2"
129+
130+
## Query mode
131+
# 1: session only
132+
# 2: gamedig (gsquery fallback)
133+
# 3: gamedig
134+
# 4: gsquery
135+
# 5: tcp
136+
querymode="2"
137+
querytype="protocol-valve"
138+
139+
## Console type
140+
consoleverbose="no"
141+
consoleinteract="no"
142+
143+
## Game Server Details
144+
# Do not edit
145+
gamename="Colony Survival"
146+
engine="unity3d"
147+
glibc="2.15"
148+
149+
#### Directories ####
150+
# Edit with care
151+
152+
## Game Server Directories
153+
systemdir="${serverfiles}"
154+
executabledir="${serverfiles}"
155+
executable="./colonyserver.x86_64"
156+
servercfgdir="${systemdir}/gamedata/settings"
157+
servercfg="${selfname}.json"
158+
servercfgdefault="colserver.json"
159+
servercfgfullpath="${servercfgdir}/${servercfg}"
160+
161+
## Backup Directory
162+
backupdir="${lgsmdir}/backup"
163+
164+
## Logging Directories
165+
logdir="${rootdir}/log"
166+
gamelogdir="${serverfiles}/gamedata/logs/server/"
167+
lgsmlogdir="${logdir}/script"
168+
consolelogdir="${logdir}/console"
169+
gamelog="${gamelogdir}/${selfname}-game.log"
170+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
171+
consolelog="${consolelogdir}/${selfname}-console.log"
172+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
173+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
174+
175+
## Logs Naming
176+
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
177+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
178+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

lgsm/data/serverlist.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cod2,cod2server,Call of Duty 2
2121
cod4,cod4server,Call of Duty 4
2222
coduo,coduoserver,Call of Duty: United Offensive
2323
codwaw,codwawserver,Call of Duty: World at War
24+
col,colserver,Colony Survival
2425
cs,csserver,Counter-Strike 1.6
2526
cscz,csczserver,Counter-Strike: Condition Zero
2627
csgo,csgoserver,Counter-Strike: Global Offensive

lgsm/functions/check_deps.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ fn_deps_build_debian(){
404404
# Barotrauma
405405
elif [ "${shortname}" == "bt" ]; then
406406
array_deps_required+=( libicu-dev )
407+
# Colony Survival
408+
elif [ "${shortname}" == "col" ]; then
409+
array_deps_required+=( coreutils )
407410
# Ecoserver
408411
elif [ "${shortname}" == "eco" ]; then
409412
array_deps_required+=( libgdiplus )
@@ -513,6 +516,9 @@ fn_deps_build_redhat(){
513516
# Call of Duty & Medal of Honor: Allied Assault
514517
elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then
515518
array_deps_required+=( compat-libstdc++-33.i686 )
519+
# Colony Survival
520+
elif [ "${shortname}" == "col" ]; then
521+
array_deps_required+=( coreutils )
516522
# Ecoserver
517523
elif [ "${shortname}" == "eco" ]; then
518524
array_deps_required+=( libgdiplus )

lgsm/functions/fix_steamcmd.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ elif [ "${shortname}" == "cmw" ]; then
7979
fn_fix_steamclient_so "32" "${executabledir}/lib"
8080
elif [ "${shortname}" == "cs" ]; then
8181
fn_fix_steamclient_so "32" "${serverfiles}"
82+
elif [ "${shortname}" == "col" ]; then
83+
fn_fix_steamclient_so "64" "${serverfiles}"
8284
elif [ "${shortname}" == "ins" ]; then
8385
fn_fix_steamclient_so "32" "${serverfiles}/bin"
8486
elif [ "${shortname}" == "pz" ]; then

lgsm/functions/info_config.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,29 @@ fn_info_config_pavlovvr(){
15251525
fi
15261526
}
15271527

1528+
fn_info_config_col(){
1529+
if [ -f "${servercfgfullpath}" ]; then
1530+
servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}")
1531+
serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}")
1532+
maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}")
1533+
port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}")
1534+
steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}")
1535+
rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}")
1536+
configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}")
1537+
1538+
# password not set
1539+
serverpassword=${serverpassword:-"NOT SET"}
1540+
queryport=${port:-"0"}
1541+
else
1542+
servername=${servername:-"NOT SET"}
1543+
serverpassword=${serverpassword:-"NOT SET"}
1544+
maxplayers=${maxplayers:-"0"}
1545+
port=${port:-"27004"}
1546+
steamport=${steamport:-"27005"}
1547+
rconpassword=${rconpassword:-"NOT SET"}
1548+
fi
1549+
}
1550+
15281551
if [ "${shortname}" == "ac" ]; then
15291552
fn_info_config_assettocorsa
15301553
elif [ "${shortname}" == "ark" ]; then
@@ -1551,6 +1574,8 @@ elif [ "${shortname}" == "cod4" ]; then
15511574
fn_info_config_cod4
15521575
elif [ "${shortname}" == "codwaw" ]; then
15531576
fn_info_config_codwaw
1577+
elif [ "${shortname}" == "col" ]; then
1578+
fn_info_config_col
15541579
elif [ "${shortname}" == "dst" ]; then
15551580
fn_info_config_dontstarve
15561581
elif [ "${shortname}" == "eco" ]; then

lgsm/functions/info_messages.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ fn_info_message_ports(){
583583
fi
584584
done
585585
# engines/games that require editing the parms.
586-
local ports_edit_array=( "Avorion" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" )
586+
local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" )
587587
for port_edit in "${ports_edit_array[@]}"; do
588588
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then
589589
parmslocation="${configdirserver}"
@@ -1445,6 +1445,16 @@ fn_info_message_pavlovvr(){
14451445
} | column -s $'\t' -t
14461446
}
14471447

1448+
fn_info_message_colony(){
1449+
echo -e "netstat -atunp | grep colonyserver"
1450+
echo -e ""
1451+
{
1452+
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
1453+
echo -e "> Game\tINBOUND\t${port}\tudp"
1454+
echo -e "> Steam\tINBOUND\t${steamport}\tudp"
1455+
} | column -s $'\t' -t
1456+
}
1457+
14481458
fn_info_message_select_engine(){
14491459
# Display details depending on game or engine.
14501460
if [ "${shortname}" == "ac" ]; then
@@ -1473,6 +1483,8 @@ fn_info_message_select_engine(){
14731483
fn_info_message_cod4
14741484
elif [ "${shortname}" == "codwaw" ]; then
14751485
fn_info_message_codwaw
1486+
elif [ "${shortname}" == "col" ]; then
1487+
fn_info_message_colony
14761488
elif [ "${shortname}" == "dst" ]; then
14771489
fn_info_message_dst
14781490
elif [ "${shortname}" == "eco" ]; then

lgsm/functions/install_config.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ elif [ "${shortname}" == "cc" ]; then
316316
fn_default_config_remote
317317
fn_set_config_vars
318318
fn_list_config_locations
319+
elif [ "${shortname}" == "col" ]; then
320+
gamedirname="ColonySurvival"
321+
array_configs+=( colserver.json )
322+
fn_fetch_default_config
323+
fn_default_config_remote
324+
fn_set_config_vars
325+
fn_list_config_locations
319326
elif [ "${shortname}" == "cs" ]; then
320327
gamedirname="CounterStrike"
321328
array_configs+=( server.cfg )

0 commit comments

Comments
 (0)