The basic use of the custom script in yml conf is to specify the path to the executable with a shebang string
value: '/path/to/script'. If you try to pass something like "/bin/python /path/to/script.py", it will fail, because exec.Command() when get an argument, treats it as a command name to do. This changes split command from the yml config by spaces. The new first string is is a command name, and the others are args.
If you want to do some bash thing with piping, it's better to pass the value like this "bash -c date | awk '{print $2}'"
The basic use of the custom script in yml conf is to specify the path to the executable with a shebang string
value: '/path/to/script'.
If you try to pass something like"/bin/python /path/to/script.py"
, it will fail, becauseexec.Command()
when get an argument, treats it as a command name to do. This changes split command from the yml config by spaces. The new first string is is a command name, and the others are args. If you want to do some bash thing with piping, it's better to pass the value like this"bash -c date | awk '{print $2}'"