acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Create notify hook for a custom shell script

Open ioqy opened this issue 2 years ago • 1 comments

Notify via a custom shell script.

The script will be called with the following parameters:

  1. Subject
  2. Content
  3. Status Code

To set the notification hook:

export CUSTOMSCRIPT_PATH="/usr/local/bin/acme-notification.sh"

acme.sh --set-notify --notify-hook customscript

The custom script can look like this:

#!/usr/bin/env sh

subject="$1"
message="$2"
status="$3"

do-something "$subject ($status): $message"

Changes to the Wiki: https://github.com/acmesh-official/acme.sh/wiki/notify/24df66b68f4c2daa2d5c0cfbb9fbfca5e644bff9

ioqy avatar Jul 17 '22 15:07 ioqy