~ fix, replacer config always replaced
This commit is contained in:
parent
0dc271ba95
commit
b9b1a01c3f
@ -5,16 +5,14 @@ set -e
|
|||||||
|
|
||||||
|
|
||||||
#create default server.config
|
#create default server.config
|
||||||
#TODO || [ cat "${SERVER_PATH}/garrysmod/cfg/server.cfg" ] check if empty (only whitespaces)
|
|
||||||
#TODO don't miss to change to master!
|
|
||||||
# not empty: grep -q '[^[:space:]]' < 'server.cfg' && echo "not empty"
|
# not empty: grep -q '[^[:space:]]' < 'server.cfg' && echo "not empty"
|
||||||
if [ ! -e "${SERVER_PATH}/garrysmod/cfg/server.cfg" ] || [ "0" = "$(grep -o '[^[:space:]]' "${SERVER_PATH}/garrysmod/cfg/server.cfg" | wc -l)" ]; then
|
if [ ! -e "${SERVER_PATH}/garrysmod/cfg/server.cfg" ] || [ "0" = "$(grep -o '[^[:space:]]' "${SERVER_PATH}/garrysmod/cfg/server.cfg" | wc -l)" ]; then
|
||||||
mkdir -p "${SERVER_PATH}/garrysmod/cfg"
|
mkdir -p "${SERVER_PATH}/garrysmod/cfg"
|
||||||
wget -O "${SERVER_PATH}/garrysmod/cfg/server.cfg" "https://raw.githubusercontent.com/jusito/docker-ttt/develop/server.cfg"
|
wget -O "${SERVER_PATH}/garrysmod/cfg/server.cfg" "https://raw.githubusercontent.com/jusito/docker-ttt/master/server.cfg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#this is a simple option for myself, but you can use it too
|
#this is a simple option for myself, but you can use it too
|
||||||
if [ "$USE_MY_REPLACER_CONFIG" = "true" ]; then
|
if [ "$USE_MY_REPLACER_CONFIG" = "true" ] && [ ! -e "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace" ]; then
|
||||||
mkdir -p "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace"
|
mkdir -p "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace"
|
||||||
wget -O "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace/config.txt" "https://raw.githubusercontent.com/jusito/ttt_entity_replace/master/config.txt.example_fas2"
|
wget -O "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace/config.txt" "https://raw.githubusercontent.com/jusito/ttt_entity_replace/master/config.txt.example_fas2"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user