mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
improved MongoDB driver support, fixed Linux install with multi-domain.
This commit is contained in:
parent
2d12139e9b
commit
e23718a859
5 changed files with 248 additions and 247 deletions
|
@ -2704,20 +2704,21 @@
|
|||
setDialogMode(2, "Add Mesh Agent", 2, null, x, 'fileDownload');
|
||||
var servername = serverinfo.name;
|
||||
if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
|
||||
var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
|
||||
|
||||
if (serverinfo.https == true)
|
||||
{
|
||||
var portStr = (serverinfo.port == 443)?'':(":" + serverinfo.port);
|
||||
if ((features & 0x2000) == 0)
|
||||
{
|
||||
Q('agins_linux_area').value = "(wget https://" + servername + portStr + "/meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + "/meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "(wget https://" + servername + portStr + "/meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + "/meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
Q('agins_linux_area').value = "(wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + domainUrlNoSlash + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "(wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Server asked that agent be installed to preferably not use a HTTP proxy.
|
||||
Q('agins_linux_area').value = "wget https://" + servername + portStr + "/meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "wget https://" + servername + portStr + "/meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
Q('agins_linux_area').value = "wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + domainUrlNoSlash + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2725,14 +2726,14 @@
|
|||
var portStr = (serverinfo.port == 80) ? '' : (":" + serverinfo.port);
|
||||
if ((features & 0x2000) == 0)
|
||||
{
|
||||
Q('agins_linux_area').value = "(wget http://" + servername + portStr + "/meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + "/meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "(wget http://" + servername + portStr + "/meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + "/meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
Q('agins_linux_area').value = "(wget http://" + servername + portStr + domainUrl + "meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + domainUrlNoSlash + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "(wget http://" + servername + portStr + domainUrl + "meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Server asked that agent be installed to preferably not use a HTTP proxy.
|
||||
Q('agins_linux_area').value = "wget http://" + servername + portStr + "/meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "wget http://" + servername + portStr + "/meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
Q('agins_linux_area').value = "wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + domainUrlNoSlash + " '" + meshid.split('/')[2] + "'\r\n";
|
||||
Q('agins_linux_area_un').value = "wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
|
||||
}
|
||||
}
|
||||
Q('aginsSelect').focus();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue