change variable names and directory to file check
All checks were successful
Deploy / BuildandPush-Docker (push) Successful in 5m0s
All checks were successful
Deploy / BuildandPush-Docker (push) Successful in 5m0s
This commit is contained in:
parent
377fb9e2f0
commit
7704abb39d
@ -1,24 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
INI_DIRECTORY="Archean-data/server/server.ini"
|
||||
ADMINS_DIRECTORY="Archean-data/server/admins.txt"
|
||||
SERVER_INI="Archean-data/server/server.ini"
|
||||
ADMINS_TXT="Archean-data/server/admins.txt"
|
||||
|
||||
if [ ! -d "$INI_DIRECTORY" ]; then
|
||||
curl -o "$INI_DIRECTORY" --create-dirs https://git.tomatentum.net/tueem/archean-server-pelican/raw/branch/master/server.ini
|
||||
if [ ! -e "$SERVER_INI" ]; then
|
||||
curl -o "$SERVER_INI" --create-dirs https://git.tomatentum.net/tueem/archean-server-pelican/raw/branch/master/server.ini
|
||||
fi
|
||||
|
||||
echo "$ADMINS" > "$ADMINS_DIRECTORY"
|
||||
echo "$ADMINS" > "$ADMINS_TXT"
|
||||
|
||||
sed -i "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" "$INI_DIRECTORY"
|
||||
sed -i "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" "$INI_DIRECTORY"
|
||||
sed -i "s/^max_simultaneous_players=.*/max_simultaneous_players=$MAX_PLAYERS/" "$INI_DIRECTORY"
|
||||
sed -i "s/^password=.*/password=$PASSWORD/" "$INI_DIRECTORY"
|
||||
sed -i "s/^server_public_name=.*/server_public_name=$SERVER_NAME/" "$INI_DIRECTORY"
|
||||
sed -i "s/^listen_port=.*/listen_port=$SERVER_PORT/" "$INI_DIRECTORY"
|
||||
sed -i "s/^spawn=.*/spawn=$SPAWN_PLANET/" "$INI_DIRECTORY"
|
||||
sed -i "s/^auto_save_interval_seconds=.*/auto_save_interval_seconds=$AUTOSAVE_INTERVAL/" "$INI_DIRECTORY"
|
||||
sed -i "s/^updates_per_second=.*/updates_per_second=$UPDATES_PER_SECOND/" "$INI_DIRECTORY"
|
||||
sed -i "s/^physics_steps_per_update=.*/physics_steps_per_update=$PHYSICS_UPDATES_PER_UPDATE/" "$INI_DIRECTORY"
|
||||
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"
|
||||
|
||||
cd Archean-server-alpha
|
||||
./Archean server
|
Loading…
x
Reference in New Issue
Block a user