mirror of
https://github.com/mr-vercetti/docker-svencoop-server.git
synced 2025-01-18 18:35:35 +01:00
20 lines
621 B
Bash
20 lines
621 B
Bash
#!/bin/bash
|
|
|
|
server_cfg_file="$SERVER_DIR/svencoop/server.cfg"
|
|
liblist_file="$SERVER_DIR/svencoop/liblist.gam"
|
|
|
|
if [[ $GAME_NAME != "" ]]; then
|
|
echo "Starting Sven Co-Op server \"$GAME_NAME\""
|
|
sed -i "s/\/\?\/\?hostname \".*\"/hostname \"$GAME_NAME\"/" $server_cfg_file
|
|
sed -i "s/\/\?\/\?game \".*\"/game \"$GAME_NAME\"/" $liblist_file
|
|
else
|
|
echo "Starting Sven Co-Op server"
|
|
fi
|
|
|
|
if [[ $GAME_PASSWORD != "" ]]; then
|
|
echo "Password protection enabled"
|
|
sed -i "s/\/\?\/\?sv_password \".*\"/sv_password \"$GAME_PASSWORD\"/" $server_cfg_file
|
|
fi
|
|
|
|
cd ${SERVER_DIR}
|
|
${SERVER_DIR}/svends_run ${GAME_PARAMS} |