add functions to portgenerator-for-deploy.sh