add lock functional to portgenerator-for-deploy.sh