Having a problem now when I am trying to run this script (Lets Encrypt Mode) after switching unifi default ports from 8080 to 80 and 8443 to 443.
Here is the script I wrote to do this from a basic install of Ubuntu 16.04:
The Unifi Controller is working before I run your script, but after I run your script the browser spins and spins and never loads the page. The port is listening however.
This is the output of curl