Not every server config needs a PostUp or PostDown so I added an if statement to not include them if the values entered in the web interface are blank.
Having the DNS parameter blank (e.g. "DNS = ") will cause import errors in the Android app using the QR Code. I've added an if statement that checks if the DNS field has been populated. If so then it will write out the whole "DNS = x.x.x.x". If not then it will not be included at all.