When I enter the consul command to call a script on an event, the script gets called when I’m entering the command and when there is an event. How do I change it so that the script is only called when there is an event and not when I enter the command?
For example, here is a simplified command to trigger on a node event:
consul watch -type nodes "bash -c 'echo TRIGGER'"
When I enter that command, I immediately get the TRIGGER output. I had assumed I would only get TRIGGER when there was an event.
Thanks in advance,