From 8d2e0165a4188593f9929415c367872a6c4c2e7a Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sat, 26 Dec 2020 15:36:20 +0100 Subject: [PATCH] improve README --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6e94ac..f010842 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # execNotify +Send notification on failure. +Or send an unconditional notification. + ## setup Create a `config.ini` file inside `execNotifyDir/config`. @@ -12,13 +15,29 @@ For the required fields, see `execNotifyDir/config/config.ini.example` sudo make install ``` -## usage +## usage of execNotify Add `execNotify` in front of your command to execute. -You can pipe into `execNotify` but **not** from `execNotify +You can pipe into `execNotify` but **not** from `execNotify` as the output gets modified. ### Example For `ls /home` run `execNotify ls /home` + +## usage of notify + +Send stdout via mail: + +`echo "Hello world!" | notify` + +Or with optional subject: + +`echo "Hello world!" | notify "someSubject"` + +Or without the pipe: + +`notify "someSubject" "Hello" "World!" "What's" "up?"` + +`notify "someSubject" "Hello World! What's up?"`