mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 23:13:21 -05:00
Added ability to specify --WebProxy
This commit is contained in:
parent
38412b1475
commit
881fe11960
@ -54,6 +54,13 @@ CheckInstallAgent() {
|
|||||||
uninstall=$1
|
uninstall=$1
|
||||||
url=$2
|
url=$2
|
||||||
meshid=$3
|
meshid=$3
|
||||||
|
if [[ $4 =~ ^--WebProxy= ]];
|
||||||
|
then
|
||||||
|
webproxy=$4
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
meshidlen=${#meshid}
|
meshidlen=${#meshid}
|
||||||
if [ $meshidlen -gt 63 ]
|
if [ $meshidlen -gt 63 ]
|
||||||
then
|
then
|
||||||
@ -61,7 +68,7 @@ CheckInstallAgent() {
|
|||||||
machinetype=$( uname -m )
|
machinetype=$( uname -m )
|
||||||
|
|
||||||
# If we have 3 arguments...
|
# If we have 3 arguments...
|
||||||
if [ $# -ge 4 ]
|
if [ $# -ge 4 ] && [ -z "$webproxy" ]
|
||||||
then
|
then
|
||||||
# echo "Computer type is specified..."
|
# echo "Computer type is specified..."
|
||||||
machineid=$4
|
machineid=$4
|
||||||
@ -164,7 +171,7 @@ DownloadAgent() {
|
|||||||
else
|
else
|
||||||
# Install the agent
|
# Install the agent
|
||||||
UpdateMshFile
|
UpdateMshFile
|
||||||
./meshagent -fullinstall --copy-msh=1
|
./meshagent -fullinstall --copy-msh=1 $webproxy
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Unable to download device group settings at: $url/meshsettings?id=$meshid."
|
echo "Unable to download device group settings at: $url/meshsettings?id=$meshid."
|
||||||
|
Loading…
Reference in New Issue
Block a user