I'm looking to write a script that checks to see if a host is up (as a boolean) so I can use it in an if statement.
I wrote this but not working
:if (string.find([/tool/ping address=192.168.0.5 count=1],"timeout") ) do={ :put "value is false" } else={ :put "value is true" }
:if (:find [/tool/ping address=192.168.0.5 count=1] "timeout" 0 ) do={ :put "value is false" } else={ :put "value is true" }
Also the scripts in netwatch (the 'test' script), are arguments passed into these at all?