-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from ltratt/doc_updates
Update documentation with new `%x %?` feature.
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ listen = "<ip-address>:<port>"; | |
github { | ||
match ".*" { | ||
cmd = "/path/to/prps/%o/%r %e %j"; | ||
errorcmd = "cat %s | mailx -s \"snare error: github.com/%o/%r\" [email protected]"; | ||
errorcmd = "cat %s | mailx -s \"snare error: github.com/%o/%r: %x %?\" [email protected]"; | ||
secret = "<secret>"; | ||
} | ||
} | ||
|
@@ -70,8 +70,9 @@ where: | |
they have completed. | ||
* `errorcmd` is the command that will be run when a `cmd` exits | ||
unsuccessfully. In this example, an email is sent to `[email protected]` | ||
with a body consisting of the comined stedrr/stdout. This assumes that you | ||
have installed, set-up, and enabled a suitable `sendmail` clone. | ||
with a title indicating the reason for non-zero exit (`%x %?`) and a body | ||
consisting of the comined stedrr/stdout. This assumes that you have | ||
installed, set-up, and enabled a suitable `sendmail` clone. | ||
* `secret` is the GitHub secret used to sign the webhook request and thus | ||
allowing `snare` to tell the difference between genuine webhook requests | ||
and those from malfeasants. | ||
|
@@ -113,7 +114,7 @@ repository: | |
```sh | ||
#! /bin/sh | ||
|
||
set -euf | ||
set -eufx | ||
|
||
# A list of email addresses separated by spaces. | ||
EMAILS="[email protected] [email protected]" | ||
|