Each Agent runs with a config file sync.conf which keeps settings for connection to Management Console and some other custom settings.
Sometimes admin needs to update it or add a new line there. It can be done manually, or in cases of massive update - via a Distribution or Script job. Create the job to deliver the scripts, add wanted agents there, configure the post download script and launch the job.
In the examples below, we'll update bootstrap_token in Windows example, and add a new parameter
use_gui:true so as to enable Agent UI in OS X example. These two examples can be extrapolated to other agents and combined in one job. Of course, each script must preserve its syntax for specific operating system.
Updating Agent Config File
Here's the script itself that actually updates the config:
To edit default parameters in config, use the following arguments: NewBootstrap, NewHost, NewFingerprint, NewStoragePath, followed by their new value. When editing folder storage path, simply type C:\new\folder as value, use brackets if there are spaces in path.
To add a new parameter use -CustomParameterName <name> and -CustomParameterValue <value>. Option to -RestartAgent is optional but recommended. File ResilioRestart.xml will be spawned automatically into a target folder by script if agent restart is requested
Agent is able to discover sync.conf in default installation directory and update it.
Here's the script
It requires path to config defined through --config <path> option. Other accepted parameters are --parameter --parameter <name1>=<value1> <name2>=<value2>. Add --restart_agent at the end. It may take around two minutes to restart it.
You'll need to add 'executable' attribute to the script.