Help Center

Selecting shell for scripts


Resilio Connect v 2.5.2 gives the choice of shells for executing scripts - either in transfer jobs or in a Script job - Powershell and CMD for Windows, Shell for unix. For each platform custom shell is also available. 

Basically there are two ways to use it:
- select default shell and pass another shell there with all necessary params and path to script itself
- select custom shell, name it and pass the script body.

 

 

 

For example, a powershell pre-indexing trigger to delete empty directories on source agent in a Distribution job.

 

Connect handles exit code for 'throw" for PS 5.0+ only. With PS version is 2.0-4.0 use

trap { exit 1 }

at the beginning of script with "throw".

 

 

When using a Custom shell, you need to specify it first: 

Script  code and parameters are to be passed in trigger body. When using it on Windows, make sure that you've set PATH variable to the shell executable in system settings.

For example, script to list the downloaded files in job folder:
12.jpg
 

Default shell (CMD for Windows and Shell for unix) can be used to start any script or command:

 

 

 

Was the article helpful? Yes / No, send feedback on article Thanks!


Please note that we won't mail you back. This is just purely feedback on the article above. If you need help from our Support Team, please use the "Contact Support" link at the top of the page.