A nice guide, but it’s making the installation process complicated by doing too much. You don’t need mongod_enable=YES, you don’t need the lines in /etc/fstab (or having it exist, at all). In my experience, the installation is no harder than:
pkg install unifi5 && sysrc unifi_enable=YES && service unifi start
I had done this myself a while ago. A caveat with my setup, for Unifi at least, is that I run jails without IPv4 connectivity; the jails don’t even have a loopback.
% ping 127.0.0.1
ping: ssend socket: Protocol not supported
This causes the connection to the local mongodb service to fail, because it’s hardcoded to use 127.0.0.1 there. Otherwise, it works fine on my setup with IPv6 only, so as long as I give it access to an IPv4 loopback address for mongodb it works.
The controller listens on IPv6, but the access point does not support IPv6 as far as I can see. An TCP proxy between the AP and the controller translating between IPv4 and IPv6 fixes that. I forward ports 80, 443 and 8080 to the controller using sniproxy.
Maybe they wanted to make their movie longer instead of finishing after several seconds with these 3 commands you mentioned :)
As for ping(8) working in a FreeBSD Jails its pretty simple. Just set security.jail.allow_raw_sockets to 1 on the FreeBSD host and they will work.
# sysctl security.jail.allow_raw_sockets=1
To make it permanent put it into the /etc/sysctl.conf file.