diff --git a/agents/meshinstall-linux.sh b/agents/meshinstall-linux.sh
index c6b5de85..d2224412 100644
--- a/agents/meshinstall-linux.sh
+++ b/agents/meshinstall-linux.sh
@@ -8,14 +8,17 @@ CheckStartupType() {
elif [[ $starttype == 'init' ]];
then
# Upstart
- if [[ `/sbin/init --version` =~ upstart ]]; then return 2;
- # Sysv-init
- return 3;
- fi
+ /sbin/init --version && [[ `/sbin/init --version` =~ upstart ]] && return 2 || return 3
+ # if [[ `/sbin/init --version` =~ upstart ]]; then return 2;
+ # Sysv-init
+ # return 3;
+ # fi
fi
return 0;
}
+
+
# Add "StartupType=(type)" to .msh file
UpdateMshFile() {
# Remove all lines that start with "StartupType="
@@ -97,13 +100,13 @@ DownloadAgent() {
mkdir -p /usr/local/mesh
cd /usr/local/mesh
echo "Downloading Mesh agent #$machineid..."
- wget $url/meshagents?id=$machineid --no-check-certificate {{{noproxy}}}-O /usr/local/mesh/meshagent
+ wget $url/meshagents?id=$machineid {{{wgetoptionshttps}}}-O /usr/local/mesh/meshagent || curl {{{curloptionshttps}}}--output /usr/local/mesh/meshagent $url/meshagents?id=$machineid
# If it did not work, try again using http
if [ $? != 0 ]
then
url=${url/"https://"/"http://"}
- wget $url/meshagents?id=$machineid {{{noproxy}}}-O /usr/local/mesh/meshagent
+ wget $url/meshagents?id=$machineid {{{wgetoptionshttp}}}-O /usr/local/mesh/meshagent || curl {{{curloptionshttp}}}--output /usr/local/mesh/meshagent $url/meshagents?id=$machineid
fi
if [ $? -eq 0 ]
@@ -111,12 +114,12 @@ DownloadAgent() {
echo "Mesh agent downloaded."
# TODO: We could check the meshagent sha256 hash, but best to authenticate the server.
chmod 755 /usr/local/mesh/meshagent
- wget $url/meshsettings?id=$meshid --no-check-certificate {{{noproxy}}}-O /usr/local/mesh/meshagent.msh
+ wget $url/meshsettings?id=$meshid {{{wgetoptionshttps}}}-O /usr/local/mesh/meshagent.msh || curl {{{curloptionshttps}}}--output /usr/local/mesh/meshagent.msh $url/meshsettings?id=$meshid
# If it did not work, try again using http
if [ $? -ne 0 ]
then
- wget $url/meshsettings?id=$meshid {{{noproxy}}}-O /usr/local/mesh/meshagent.msh
+ wget $url/meshsettings?id=$meshid {{{wgetoptionshttp}}}-O /usr/local/mesh/meshagent.msh || curl {{{curloptionshttp}}}--output /usr/local/mesh/meshagent.msh $url/meshsettings?id=$meshid
fi
if [ $? -eq 0 ]
@@ -145,7 +148,7 @@ DownloadAgent() {
elif [ $starttype -eq 3 ]
then
# initd
- wget $url/meshagents?script=2 --no-check-certificate {{{noproxy}}}-O /etc/init.d/meshagent
+ wget $url/meshagents?script=2 {{{wgetoptionshttps}}}-O /etc/init.d/meshagent || curl {{{curloptionshttps}}}--output /etc/init.d/meshagent $url/meshagents?script=2
chmod +x /etc/init.d/meshagent
# creates symlinks for rc.d
update-rc.d meshagent defaults
diff --git a/package.json b/package.json
index 3540be0c..85ce6c49 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "meshcentral",
- "version": "0.3.7-l",
+ "version": "0.3.7-n",
"keywords": [
"Remote Management",
"Intel AMT",
diff --git a/views/default-min.handlebars b/views/default-min.handlebars
index 8cbcefa3..3c00286b 100644
--- a/views/default-min.handlebars
+++ b/views/default-min.handlebars
@@ -1 +1 @@
-
{{{title}}}
My Devices My Account My Events My Files My Users My Server
General Desktop Terminal Files Events Intel® AMT Console
Server disconnected , click to reconnect .
My Devices No device groups.
My Account Device Groups ( New )
My Files These files are shared publicly, click "link" to get public url.
✓
✗
My Server Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
General -
File Selection
Local file upload Server file selection Agent Remote Desktop Scaling
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Slow Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, Fastest RLE16, Recommended RAW8, Slow RAW16, Very Slow
\ No newline at end of file
+ {{{title}}}
My Devices My Account My Events My Files My Users My Server
General Desktop Terminal Files Events Intel® AMT Console
Server disconnected , click to reconnect .
My Devices No device groups.
My Account Device Groups ( New )
My Files These files are shared publicly, click "link" to get public url.
✓
✗
My Server Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
General -
File Selection
Local file upload Server file selection Agent Remote Desktop Scaling
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Slow Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, Fastest RLE16, Recommended RAW8, Slow RAW16, Very Slow
\ No newline at end of file
diff --git a/views/default-mobile-min.handlebars b/views/default-mobile-min.handlebars
index edf80fd0..5fc51682 100644
--- a/views/default-mobile-min.handlebars
+++ b/views/default-mobile-min.handlebars
@@ -1 +1 @@
- {{{title}}}
Server disconnected , click to reconnect .
◀
Account Security
Account Actions
Device Groups ( New )
◀
My Files
◀
\ No newline at end of file
+ {{{title}}}
Server disconnected , click to reconnect .
◀
Account Security
Account Actions
Device Groups ( New )
◀
My Files
◀
\ No newline at end of file
diff --git a/webserver.js b/webserver.js
index ed19cffb..eccd4597 100644
--- a/webserver.js
+++ b/webserver.js
@@ -2582,7 +2582,20 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
var scriptInfo = obj.parent.meshAgentInstallScripts[req.query.script];
if (scriptInfo == null) { res.sendStatus(404); return; }
res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Type': 'text/plain', 'Content-Disposition': 'attachment; filename="' + scriptInfo.rname + '"' });
- res.send(scriptInfo.data.split('{{{noproxy}}}').join((domain.agentnoproxy === true)?'--no-proxy ':''));
+ var data = scriptInfo.data;
+ var cmdoptions = { wgetoptionshttp: '', wgetoptionshttps: '', curloptionshttp: '-L ', curloptionshttps: '-L ' }
+ if (isTrustedCert() == false) {
+ cmdoptions.wgetoptionshttps += '--no-check-certificate ';
+ cmdoptions.curloptionshttps += '-k ';
+ }
+ if (domain.agentnoproxy === true) {
+ cmdoptions.wgetoptionshttp += '--no-proxy ';
+ cmdoptions.wgetoptionshttps += '--no-proxy ';
+ cmdoptions.curloptionshttp += '--noproxy \'*\' ';
+ cmdoptions.curloptionshttps += '--noproxy \'*\' ';
+ }
+ for (var i in cmdoptions) { data = data.split('{{{' + i + '}}}').join(cmdoptions[i]); }
+ res.send(data);
} else if (req.query.meshcmd != null) {
// Send meshcmd for a specific platform back
var agentid = parseInt(req.query.meshcmd);