archean-server-pelican/archean_start.sh

19 lines
1.4 KiB
Bash
Raw Normal View History

2024-10-18 22:15:37 +02:00
#!/bin/bash
2024-10-20 13:38:09 +02:00
DIRECTORY="Archean-data"
if [ ! -d "$DIRECTORY" ]; then
curl -o "$DIRECTORY/server/server.ini" https://git.tomatentum.net/tueem/archean-server-pelican/raw/branch/master/server.ini
fi
sed "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" Archean-data/server/server.ini > Archean-data/server/server.ini
sed "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" Archean-data/server/server.ini > Archean-data/server/server.ini
2024-10-19 10:05:24 +02:00
sed "s/^max_simultaneous_players=.*/max_simultaneous_players=$MAX_PLAYERS/" data/server/server.ini > data/server/server.ini
sed "s/^password=.*/password=$PASSWORD/" data/server/server.ini > data/server/server.ini
sed "s/^server_public_name=.*/server_public_name=$NAME/" data/server/server.ini > data/server/server.ini
sed "s/^listen_port=.*/listen_port=$SERVER_PORT/" data/server/server.ini > data/server/server.ini
sed "s/^spawn=.*/spawn=$SPAWN_PLANET/" data/server/server.ini > data/server/server.ini
sed "s/^auto_save_interval_seconds=.*/auto_save_interval_seconds=$AUTOSAVE_INTERVAL/" data/server/server.ini > data/server/server.ini
sed "s/^updates_per_second=.*/updates_per_second=$UPDATES_PER_SECOND/" data/server/server.ini > data/server/server.ini
sed "s/^physics_steps_per_update=.*/physics_steps_per_update=$PHYSICS_UPDATES_PER_UPDATE/" data/server/server.ini > data/server/server.ini