Rework get_ports.sh to make it not use a lock file

Edited by Michał Kępień

Merge request reports