Skip to content

Commit

Permalink
update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusraupach committed Jan 7, 2025
1 parent 1338c7c commit 9966370
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
: "${BACKUPSHORT:=}"
: "${BACKUPLONG:=}"
: "${CROSSPLAY:=false}"

# : "${INSTANCEID:="1"}"
: "${INSTANCEID:=""}"

# PRESET="${PRESET:-""}"
# MODIFIER_COMBAT="${MODIFIER_COMBAT:-""}"
Expand Down Expand Up @@ -72,6 +71,10 @@ function start() {
CROSSPLAY=true
shift 1
;;
--instanceid)
INSTANCEID="$2"
shift 2
;;
*)
echo "Unknown option: $1"
exit 1
Expand Down Expand Up @@ -123,7 +126,11 @@ function start() {
ARGS+=("-crossplay")
fi

exec /home/steam/valheim-dedicated-server/valheim_server.x86_64 "${ARGS[@]}"
if [[ "$INSTANCEID" == "true" ]]; then
ARGS+=("-instanceid" "$INSTANCEID")
fi

/home/steam/valheim-dedicated-server/start_server.sh "${ARGS[@]}"
}

function update() {
Expand Down

0 comments on commit 9966370

Please sign in to comment.