During installation the script is unable to replace the MTX_TOKEN entries in ~/ots/mediamtx/mediamtx.yml with the correct OTS_MEDIAMTX_TOKEN value from ~/ots/config.yml. I've observed this issue on both Raspberry Pi 3B and a Pi 5 running Pi OS Lite.
To address this, consider including these lines (here?) to automate the token replacement:
OTS_MEDIAMTX_TOKEN=$(grep "OTS_MEDIAMTX_TOKEN" ~/ots/config.yml | awk -F': ' '{print $2}' | tr -d ' ')
sudo sed -i "s/MTX_TOKEN/$OTS_MEDIAMTX_TOKEN/g" ~/ots/mediamtx/mediamtx.yml