2024-10-18 22:15:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-10-21 03:40:50 +02:00
|
|
|
SERVER_INI="Archean-data/server/server.ini"
|
|
|
|
ADMINS_TXT="Archean-data/server/admins.txt"
|
2024-10-20 13:38:09 +02:00
|
|
|
|
2024-10-21 03:40:50 +02:00
|
|
|
if [ ! -e "$SERVER_INI" ]; then
|
|
|
|
curl -o "$SERVER_INI" --create-dirs https://git.tomatentum.net/tueem/archean-server-pelican/raw/branch/master/server.ini
|
2024-10-20 13:38:09 +02:00
|
|
|
fi
|
|
|
|
|
2024-10-21 03:40:50 +02:00
|
|
|
echo "$ADMINS" > "$ADMINS_TXT"
|
2024-10-20 13:38:09 +02:00
|
|
|
|
2024-10-21 03:40:50 +02:00
|
|
|
sed -i "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" "$SERVER_INI"
|
|
|
|
sed -i "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" "$SERVER_INI"
|
|
|
|
sed -i "s/^max_simultaneous_players=.*/max_simultaneous_players=$MAX_PLAYERS/" "$SERVER_INI"
|
|
|
|
sed -i "s/^password=.*/password=$PASSWORD/" "$SERVER_INI"
|
|
|
|
sed -i "s/^server_public_name=.*/server_public_name=$SERVER_NAME/" "$SERVER_INI"
|
|
|
|
sed -i "s/^listen_port=.*/listen_port=$SERVER_PORT/" "$SERVER_INI"
|
|
|
|
sed -i "s/^spawn=.*/spawn=$SPAWN_PLANET/" "$SERVER_INI"
|
|
|
|
sed -i "s/^auto_save_interval_seconds=.*/auto_save_interval_seconds=$AUTOSAVE_INTERVAL/" "$SERVER_INI"
|
|
|
|
sed -i "s/^updates_per_second=.*/updates_per_second=$UPDATES_PER_SECOND/" "$SERVER_INI"
|
|
|
|
sed -i "s/^physics_steps_per_update=.*/physics_steps_per_update=$PHYSICS_UPDATES_PER_UPDATE/" "$SERVER_INI"
|
2024-10-20 20:54:33 +00:00
|
|
|
|
2024-10-20 21:53:24 +00:00
|
|
|
cd Archean-server-alpha
|
|
|
|
./Archean server
|