#!/usr/bin/env bash
set -euo pipefail

if [[ "${VOIMA_SERVICE_MODE:-0}" != "1" && "$#" -eq 0 ]]; then
    exec xdg-open "https://localhost:${VOIMA_PORT:-5010}/?id=strength_bench&sport=svry_max"
fi

exec /opt/voima-voimapunnerrus/VOIMA-Voimapunnerrus "$@"
