Since looks like Rex::Services::LocalRelay keeps a list of relays, I ask myself if it should be a method for Rex::Services::LocalRelay. I'm not familiar with this code really and I'm not super sure if relays should be saved and stopped from another code location. Just pointing, maybe hasn't sense to add a new stop_all_relays to Rex::Services::LocalRelay :)