2022-03-24 23:54:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-03-27 19:34:05 +02:00
|
|
|
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
|
|
|
|
|
2022-03-24 23:54:55 +01:00
|
|
|
cd ${SERVER_DIR}
|
2022-03-27 19:34:05 +02:00
|
|
|
${SERVER_DIR}/svends_run ${GAME_PARAMS}
|