range-testing/scripts/setup.sh

31 lines
610 B
Bash
Raw Normal View History

2025-09-10 13:36:00 -04:00
#!/bin/bash
set -e
# Run local setup scripts
./iptun.sh
./srsran_performance.sh
# Start core container
docker start core
# Run commands inside core container
docker exec -d core bash -c "
cd /etc/open5gs && \
systemctl start mongod && \
./go.sh
"
# Start ran container
docker start ran
# Check if gnb tmux session exists inside ran container
docker exec -it ran bash -c '
if tmux has-session -t gnb 2>/dev/null; then
echo "Attaching to existing gnb session..."
exec tmux attach -t gnb
else
echo "Starting new gnb session..."
exec tmux new-session -s gnb "gnb -c gnb.yaml"
fi
'