Open cqr opened 6 years ago
Have at it. It was among the original goals of the project.
I got mine working by adding a line to head.inc
$services_menu[] = array(gettext("UniFi Controller"), "/services_unifi.php");
Then creating a services_unifi.php file that contains:
<?php require("guiconfig.inc"); header("location: https://172.16.100.200:8443"); ?>
Only problem is, i had to manually insert my ip of the controller. Anyone know of a better way?
Wouldn't $_SERVER['SERVER_ADDR']
work for that?
Do you have this in a branch on github we can look at?
I suppose the install.sh script could check whether services_unifi.php exists and if not, then add it in the way we do the .rc file, and then check for the line in head.inc and insert it if necessary…
Thanks for your reply John. I'm not a PHP dev by day lol. I don't have anything on github at the moment.
Well thanks for the suggestion and example. It’s a simple solution. The next step is to automate.
You're welcome. I like the idea behind this. If I can help in testing in any way let me know.
Thanks inetsec! Worked great.
any updates on this feature? we are currently supporting Pfsense and OPNsense though
Have a nice day, is there any progress in this thought? It is almost unknown in Linux, but I am no stranger to PHP, HTML and writing C C code for x86 and PICs. So, if you help me stim. So in the evening I can add this to the original installation script. I would love to have a UniFi driver in the PfSense firewall. So far, I've installed the UniFi driver from the console. But I can't find out if the driver works, I don't know how and I don't know how to get to the UniFi web interface of the driver. If you tell me exactly where to find certain files, I could give it in PHP.
Have a nice evening Pavel Prochazka.zde.cz
Wouldn't
$_SERVER['SERVER_ADDR']
work for that?Do you have this in a branch on github we can look at?
require("guiconfig.inc");
$ip_host = "https://" . ($_SERVER['SERVER_ADDR']) . ':8443';
header("location: $ip_host");
I can look into doing this if a PR is welcome