run-script [option] [scriptname] [parameters]
The "run-script" command runs a script from /etc/syncteam/scripts directory.
It is possible to run the script with parameters.
RESTAPI: The data can be passed in the body like this:
{
"parameters": {
"scriptname": "myscript"
}
}
| Name | Value | Description | Example |
|---|---|---|---|
| json | prints out a JSON-formatted structure | ||
| stop | job-id | stops the running script | myscript |
| list | pattern status | shows a list of scripts; use the search [pattern] to filter the list; [status] can be: running, done or any | run-script all any |
| scriptname | the name of the scriptfile | myscript | |
| parameters | optional parameters to add to the script | my parameters |
{
"parameters": {
"scriptname": [scriptname]
}
}curl -X PUT /api/run-script -d
"{
\"parameters\": {
\"scriptname\": \"myscript\"
}
}"