Usage: /usr/local/bin/notify-when-up2 --true-command cmd -f|--false-command cmd Loop until cmd returns shell-false -t|--true-command cmd Loop until cmd returns shell-true -g|--greater-than fieldno cmd value Loop until fieldno of cmd output is > value -G|--greater-than-or-equal-to fieldno cmd value Loop until fieldno of cmd output is >= value -l|--less-than fieldno cmd value Loop until fieldno of cmd output is < value -L|--less-than-or-equal-to fieldno cmd value Loop until fieldno of cmd output is <= value -e|--equal-to fieldno cmd value Loop until fieldno of cmd output is == value -p|--pid pid Loop until pid exists -c|--spawn-command cmd Spawn cmd and loop until it exits -S|--pid-by-process-name process-name-regex Wait for pid (id'd by regex) to exit (flat view) -s|--pid-by-process-name-hierarchically process-name-regex Wait for pid (id'd by regex) to exit (tree view) -n|--check-host-port host tcpport Wait for host:tcpport to listen -E|--email-address email-address -m|--max-seconds seconds -i|--check-interval n Check every n seconds -r|--remote-host hostname Check on hostname -b|--block -w|--no-blocking -P|--send-page --delta command -d|--docker Prompt with a list of docker containers and use one -D|--docker-container dc Use dc as docker container --sudo sudo on the final hop. Does not try to authenticate -h|--help Options are very order sensitive - EG, you need to specify --remote-host before --pid, to make --pid operate on the correct host. Also, you can specify more than one checking option on the same command. For example: /usr/local/bin/notify-when-up2 --pid 12345 --spawn-command "sleep 10" --pid 54321 Special (and optional) environment variables NWUEMAIL The email address to send alerts to and from NWUPAGE The email address to send pages to and from NWUMAILACCOUNT The name of the account to which you wish to send e-mail Please note that if sudo on the (remote) host requires a password, this program will appear to hang.
You can e-mail the author with questions or comments: