Fix SuperTuxKart deploy
This commit is contained in:
parent
a45c619534
commit
6f518a513a
|
@ -54,7 +54,7 @@ index 3516ffe03..aa3fd698b 100644
|
|||
+ " race_rowid INTEGER NOT NULL, -- ROWID of the race\n"
|
||||
+ " elapsed_time FLOAT NOT NULL, -- Total race time\n"
|
||||
+ " player_name TEXT NOT NULL -- Player name\n"
|
||||
+ ") WITHOUT ROWID;", playerresults_table_name.c_str());
|
||||
+ ");", playerresults_table_name.c_str());
|
||||
+ if(easySQLQuery(query)) {
|
||||
+ m_server_playerresults_table = playerresults_table_name;
|
||||
+ }
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
<server-config version="6" >
|
||||
|
||||
<!-- Name of server, encode in XML if you want to use unicode characters. -->
|
||||
<server-name value="STK onFOSS-LAN Server" />
|
||||
<server-name value="STK onFOSS Server" />
|
||||
|
||||
<!-- Port used in server, if you specify 0, it will use the server port specified in stk_config.xml. If you wish to use a random port, set random-server-port to '1' in user config. STK will automatically switch to a random port if the port you specify fails to be bound. -->
|
||||
<server-port value="0" />
|
||||
|
||||
<!-- Game mode in server, 0 is normal race (grand prix), 1 is time trial (grand prix), 3 is normal race, 4 time trial, 6 is soccer, 7 is free-for-all and 8 is capture the flag. Notice: grand prix server doesn't allow for players to join and wait for ongoing game. -->
|
||||
<server-mode value="3" />
|
||||
<server-mode value="0" />
|
||||
|
||||
<!-- Difficulty in server, 0 is beginner, 1 is intermediate, 2 is expert and 3 is supertux (the most difficult). -->
|
||||
<server-difficulty value="3" />
|
||||
|
||||
<!-- Number of grand prix tracks per game (If grand prix enabled). -->
|
||||
<gp-track-count value="3" />
|
||||
<gp-track-count value="5" />
|
||||
|
||||
<!-- Use goal target in soccer. -->
|
||||
<soccer-goal-target value="false" />
|
||||
|
@ -32,7 +32,7 @@
|
|||
<private-server-password value="" />
|
||||
|
||||
<!-- Message of today shown in lobby, you can enter encoded XML words here or a file.txt and let STK load it. -->
|
||||
<motd value="Welcome to onFOSS-LAN" />
|
||||
<motd value="Welcome to onFOSS" />
|
||||
|
||||
<!-- If this value is set to false, the server will ignore chat messages from all players. -->
|
||||
<chat value="true" />
|
||||
|
@ -41,7 +41,7 @@
|
|||
<chat-consecutive-interval value="8" />
|
||||
|
||||
<!-- Allow players to vote for which track to play. If this value is set to false, the server will randomly pick the next track to play. -->
|
||||
<track-voting value="true" />
|
||||
<track-voting value="false" />
|
||||
|
||||
<!-- Timeout in seconds for selecting karts and (or) voting tracks in server, you may want to use a lower value if you have track-voting off. -->
|
||||
<voting-timeout value="30" />
|
||||
|
@ -53,7 +53,7 @@
|
|||
<validating-player value="true" />
|
||||
|
||||
<!-- Disable it to turn off all stun related code in server, it allows for saving of server resources if your server is not behind a firewall. -->
|
||||
<firewalled-server value="true" />
|
||||
<firewalled-server value="false" />
|
||||
|
||||
<!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently uses dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port. If STK detects your server has no public IPv6 address or port differs between IPv4 and IPv6 then it will use IPv4 only socket. For system which doesn't support dual-stack socket (like OpenBSD) you may fail to be connected by IPv4 clients. You can override the detection in config.xml at supertuxkart config-0.10 folder, with default-ip-type option. -->
|
||||
<ipv6-connection value="true" />
|
||||
|
@ -131,7 +131,7 @@
|
|||
<state-frequency value="10" />
|
||||
|
||||
<!-- Use sql database for handling server stats and maintenance, STK needs to be compiled with sqlite3 supported. -->
|
||||
<sql-management value="false" />
|
||||
<sql-management value="true" />
|
||||
|
||||
<!-- Database filename for sqlite to use, it can be shared for all servers created in this machine, and STK will create specific table for each server. You need to create the database yourself first, see NETWORKING.md for details -->
|
||||
<database-file value="stkservers.db" />
|
||||
|
|
|
@ -38,7 +38,7 @@ mkdir -p ${stk_dir}
|
|||
curl --location "https://github.com/supertuxkart/stk-code/releases/download/${stk_version}/SuperTuxKart-${stk_version}-linux-x86_64.tar.xz" | tar --extract --xz --no-same-owner --strip-components=1 --directory=${stk_dir}
|
||||
|
||||
builddir=""${TMPDIR:-/tmp}/stk-build""
|
||||
if [ -d "$builddir" ];
|
||||
if [ -d "$builddir" ]; then
|
||||
rm -rf "$builddir"
|
||||
fi
|
||||
mkdir -p "$builddir"
|
||||
|
@ -50,6 +50,7 @@ cd "$builddir"/build
|
|||
cmake ../stk-code-${stk_version}/ -DCMAKE_INSTALL_PREFIX=/opt/SuperTuxKart-${stk_version}/ -DSERVER_ONLY=On
|
||||
make -j 2
|
||||
make install
|
||||
rm -rf "$builddir"
|
||||
|
||||
ln -s ${stk_dir}/bin/supertuxkart /usr/games/supertuxkart
|
||||
|
||||
|
@ -86,7 +87,7 @@ EOF
|
|||
cat > /etc/systemd/system/supertuxkartscores.service <<EOF
|
||||
[Unit]
|
||||
Description=SuperTuxKart score service
|
||||
After=network.target
|
||||
After=network.target supertuxkart.service
|
||||
|
||||
[Service]
|
||||
ExecStart=${stk_dir}/supertuxkartscores.py
|
||||
|
@ -98,7 +99,7 @@ WantedBy=multi-user.target
|
|||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now supertuxkart.service
|
||||
systemctl enable --now supertuxkart.service supertuxkartscores.service
|
||||
|
||||
# Add firewall rules
|
||||
firewall-cmd --zone=public --add-port=2757/udp --permanent
|
||||
|
|
|
@ -33,7 +33,7 @@ nav_pill: tournament
|
|||
}
|
||||
else {
|
||||
supertuxkartScoreUpdate();
|
||||
//setInterval(supertuxkartScoreUpdate, 10000);
|
||||
setInterval(supertuxkartScoreUpdate, 10000);
|
||||
}
|
||||
</script>
|
||||
<noscript><p><a href="supertuxkartscore.json">Results</a> (Enable JavaScript for dynamic updates)</p></noscript>
|
||||
|
|
Loading…
Reference in New Issue