Only override serverMap if default or empty

This commit is contained in:
Ben Peddell 2017-10-06 06:03:44 +10:00 committed by GitHub
parent e3c09312e4
commit 47245a3363

View File

@ -643,7 +643,7 @@ function getServerMapName(){
local mapname="${serverMap}"
# extract the map name from the active map mod
if [ -n "$serverMapModId" ]; then
if [[ ( -z "$mapname" || "$mapname" == "TheIsland" ) && -n "$serverMapModId" ]]; then
mapname="$(perl -e '
my $data;
{ local $/; $data = <>; }
@ -937,7 +937,7 @@ doRun() {
esac
done < <(sed -n 's/^\(arkmod_[^= ]*\)=.*/\1/p' <"$configfile")
if [ -n "$serverMapModId" ]; then
if [[ ( -z "$serverMap" || "$serverMap" == "TheIsland" ) && -n "$serverMapModId" ]]; then
serverMap="$(perl -e '
my $data;
{ local $/; $data = <>; }