Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of Server Settings Based On Environment Variables #304

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c4c1ebb
insert example files to use for starting the template
Dec 25, 2019
80eb02f
Added UpdateTemplate Function
Dec 25, 2019
c0498cb
ServerSettings in bash done.
Dec 25, 2019
7c3971e
update quotes to prevent globing, and allow for expansion
Dec 25, 2019
01425f3
replace values with template keys
Dec 26, 2019
6995163
Change template keys with substrings
Dec 26, 2019
8393065
add newline to end of server settings template
Dec 27, 2019
bd44ae6
Complete Shell Map Gen Settings
Dec 27, 2019
bddbd4a
add quotes to quoted areas.
Dec 27, 2019
b39b141
replace map gen template values with sed keys
Dec 27, 2019
319683b
add extra space
Dec 27, 2019
c5cb7b1
Completed script for map settings
Dec 27, 2019
26bc037
update template
Dec 27, 2019
37c03e5
add newline at end of template
Dec 27, 2019
65b34a6
remove shebang space.
Dec 27, 2019
bd18cba
move settigns file generation from docker-entrypoint.sh and create-se…
Dec 27, 2019
e9dc37b
Add environment Variable to enable settings file generation
Dec 27, 2019
2dedaab
add table of options to the readme, and several options to controll p…
Dec 27, 2019
b59f73b
add backing up old settings files
Dec 27, 2019
fa4adb5
Merge branch 'master' into env_vars
Jan 24, 2020
c7e3a8e
add env_vars files to 0.18 folder
Jan 24, 2020
8ec7688
update to prevent globbing and word splitting
Jan 24, 2020
fdc5758
remove unnecessary quotes
Jan 24, 2020
3adce84
make create-settings executable
Jan 28, 2020
4cf70cd
Fix Unset Variable Error
Jan 28, 2020
8896984
Merge branch 'master' of github.com:factoriotools/factorio-docker int…
Feb 29, 2020
6a2eee0
Fix to allow for new 0.18 settings, and to properly check for setting…
Feb 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add environment Variable to enable settings file generation
  • Loading branch information
Jeffrey Koehler committed Dec 27, 2019
commit e9dc37b2a0f8d9ae87f24755b2ff5e579306d642
17 changes: 16 additions & 1 deletion 0.17/files/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -19,7 +19,22 @@ if [[ ! -f $CONFIG/rconpw ]]; then
fi

#call the script to create the settings from the template settings json files.
./create-settings.sh
if [[ $GENERATE_SETTINGS_FILES ]]; then
./create-settings.sh
else
if [[ ! -f $CONFIG/server-settings.json ]]; then
# Copy default settings if server-settings.json doesn't exist
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
fi

if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
fi

if [[ ! -f $CONFIG/map-settings.json ]]; then
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
fi
fi

NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
if [[ $NRTMPSAVES -gt 0 ]]; then