-
Notifications
You must be signed in to change notification settings - Fork 0
/
supertuxkart-entrypoint.sh
executable file
·27 lines (21 loc) · 1.06 KB
/
supertuxkart-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
echo "Initialize SuperTuxKart user account"
supertuxkart --init-user --login=$stk_user --password=$stk_pw
if [[ ! -z "$stk_aikarts" && "$stk_aikarts" > "0" ]]
then
echo "\$stk_aikarts is set"
echo "Starting SuperTuxKart server in background"
supertuxkart --server-config=/home/stk/.config/supertuxkart/config-0.10/server_config.xml &
if [ -z "$stk_serverpw" ]
then
echo "\$stk_serverpw is empty - connect $stk_aikarts bots to server without a password"
sleep 15 && supertuxkart --connect-now=localhost:2759 --disable-polling --network-ai=$stk_aikarts
else
echo "\$stk_serverpw is set - connect $stk_aikarts bots to server with password"
sleep 15 && supertuxkart --connect-now=localhost:2759 --disable-polling --server-password=$stk_serverpw --network-ai=$stk_aikarts
fi
else
echo "\$stk_aikarts is not set"
echo "Starting SuperTuxKart server in foreground"
supertuxkart --server-config=/home/stk/.config/supertuxkart/config-0.10/server_config.xml --login=$stk_user --password=$stk_pw
fi