mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 22:17:31 +03:00
Merge pull request #5371 from Ylianst/agentinvite-commands-fix
fix agentinvite linux install/uninstall commands
This commit is contained in:
commit
955c6e1888
@ -364,22 +364,22 @@
|
||||
if (serverHttps == 1) {
|
||||
var portStr = (serverPort == 443) ? '' : (':' + serverPort);
|
||||
if (serverNoProxy == 0) {
|
||||
linuxInstall = '(wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-check-certificate -O ./meshinstall.sh || wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = '(wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-check-certificate -O ./meshinstall.sh || wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
|
||||
linuxInstall = '(wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-check-certificate -O ./meshinstall.sh || wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = '(wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-check-certificate -O ./meshinstall.sh || wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh uninstall https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh uninstall https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
} else {
|
||||
// Server asked that agent be installed to preferably not use a HTTP proxy.
|
||||
linuxInstall = 'wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = 'wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
|
||||
linuxInstall = 'wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = 'wget "https://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh uninstall https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh uninstall https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
}
|
||||
} else {
|
||||
var portStr = (serverPort == 80) ? '' : (':' + serverPort);
|
||||
if (serverNoProxy == 0) {
|
||||
linuxInstall = '(wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" -O ./meshinstall.sh || wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = '(wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" -O ./meshinstall.sh || wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
|
||||
linuxInstall = '(wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" -O ./meshinstall.sh || wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = '(wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" -O ./meshinstall.sh || wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh uninstall http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh uninstall http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
} else {
|
||||
// Server asked that agent be installed to preferably not use a HTTP proxy.
|
||||
linuxInstall = 'wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = 'wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
|
||||
linuxInstall = 'wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
linuxUnInstall = 'wget "http://' + servername + portStr + domainUrl + 'meshagents?script=1' + loginkey + '" --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh uninstall http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\' || ./meshinstall.sh uninstall http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
|
||||
}
|
||||
}
|
||||
QH('linuxinstall', linuxInstall);
|
||||
|
Loading…
Reference in New Issue
Block a user