parent
0428d0fab4
commit
24df66b68f
25
notify.md
25
notify.md
|
@ -569,7 +569,32 @@ acme.sh --set-notify --notify-hook callmebotWhatsApp
|
|||
|
||||
The `CALLMEBOT_YOUR_PHONE_NO` and `CALLMEBOT_API_KEY` will be saved in ~/.acme.sh/account.conf and will be reused when needed.
|
||||
|
||||
## 21. Set notification for customscript
|
||||
|
||||
Notify via a custom shell script. The script is called with the following three parameters:
|
||||
1. Subject
|
||||
2. Message
|
||||
3. Status code (0: success, 1: error 2: skipped)
|
||||
|
||||
To set the notification hook:
|
||||
|
||||
```sh
|
||||
export CUSTOMSCRIPT_PATH="/usr/local/bin/acme-notification.sh"
|
||||
|
||||
acme.sh --set-notify --notify-hook customscript
|
||||
```
|
||||
|
||||
The CUSTOMSCRIPT_PATH will be saved in ~/.acme.sh/account.conf and will be reused when needed.
|
||||
|
||||
|
||||
Template for a custom script:
|
||||
|
||||
```sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
subject="$1"
|
||||
message="$2"
|
||||
status="$3"
|
||||
|
||||
do-something "$subject ($status): $message"
|
||||
```
|
Loading…
Reference in New Issue