2020-12-06 16:59:16 +01:00
|
|
|
# execNotify
|
|
|
|
|
2020-12-26 15:36:20 +01:00
|
|
|
Send notification on failure.
|
|
|
|
Or send an unconditional notification.
|
|
|
|
|
2020-12-06 16:59:16 +01:00
|
|
|
## setup
|
|
|
|
|
|
|
|
Create a `config.ini` file inside `execNotifyDir/config`.
|
|
|
|
|
|
|
|
For the required fields, see `execNotifyDir/config/config.ini.example`
|
|
|
|
|
|
|
|
## installation
|
|
|
|
|
|
|
|
```shell
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
2020-12-26 15:36:20 +01:00
|
|
|
## usage of execNotify
|
2020-12-06 16:59:16 +01:00
|
|
|
|
|
|
|
Add `execNotify` in front of your command to execute.
|
|
|
|
|
2020-12-26 15:36:20 +01:00
|
|
|
You can pipe into `execNotify` but **not** from `execNotify`
|
2020-12-06 16:59:16 +01:00
|
|
|
as the output gets modified.
|
|
|
|
|
|
|
|
### Example
|
|
|
|
|
|
|
|
For `ls /home` run `execNotify ls /home`
|
2020-12-26 15:36:20 +01:00
|
|
|
|
|
|
|
## 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?"`
|