Skip to content

Commit

Permalink
Update to installation instructions in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
timrichard committed Jul 16, 2023
1 parent 3554c48 commit 46c618a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### waitfor

Small golang utility I've produced to block until a host is pingable.
Designed to be used in expressions such as ```waitfor 192.168.1.2 60 && /bin/dosomething```

Designed to be used in expressions such as `waitfor 192.168.1.2 60 && /bin/dosomething`


#### Usage
Expand All @@ -10,3 +11,18 @@ Usage: waitfor <ip_addr> <timeout_secs>

It sends one ping in a loop until either a response is received, or <timeout> seconds have elapsed with no response.
It ends with an exit code 0 if a response was received, otherwise exit code 1.

#### Installation

##### MacOS and Linux

After deploying the binary to a suitable directory like `/usr/local/bin`, ensure the permissions are correct.

*Example* : `sudo chmod u=rwx,go=rx /usr/local/bin/waitfor`

##### Then for Linux only...


Also as root, use `setcap` to allow the binary to use raw sockets so that it can send and receive ICMP packets.

*Example* : `sudo setcap cap_net_raw=+ep /usr/local/bin/waitfor`

0 comments on commit 46c618a

Please sign in to comment.