Runs a shell script to verify that this label assignment is correct. If the script exits with a non-zero return code, the label is considered invalid, and the agent will be marked offline.
The remote file system root of the agent is the working directory for the script.
If the script has no header line like #!/bin/sh
, then the shell configured system-wide will be used.
The header line can be configured to write script in another language (like #!/bin/perl
).
The header line can be configured to control the shell options used in the script.
By default, the shell will be invoked with the -ex
option.
Commands are printed before being executed and the script is considered a failure if any of the commands exits with a non-zero exit code.
Add options to the #!/bin/...
line to change this behavior.