ioqy 2022-07-17 17:51:36 +02:00
parent 0428d0fab4
commit 24df66b68f
1 changed files with 25 additions and 0 deletions

@ -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"
```