acme.sh
acme.sh copied to clipboard
customscript notification won't work
Steps to reproduce
copy custom_script_file to /acme.sh/customscript.sh
execute
export CUSTOMSCRIPT_PATH="/acme.sh/customscript.sh"
acme.sh --set-notify --notify-hook customscript --debug 2
Debug log
[Wed Aug 31 11:59:20 UTC 2022] Lets find script dir.
[Wed Aug 31 11:59:20 UTC 2022] _SCRIPT_='/usr/local/bin/acme.sh'
[Wed Aug 31 11:59:21 UTC 2022] _script='/root/.acme.sh/acme.sh'
[Wed Aug 31 11:59:21 UTC 2022] _script_home='/root/.acme.sh'
[Wed Aug 31 11:59:21 UTC 2022] Using default home:/root/.acme.sh
[Wed Aug 31 11:59:21 UTC 2022] Using config home:/acme.sh
[Wed Aug 31 11:59:21 UTC 2022] LE_WORKING_DIR='/root/.acme.sh'
https://github.com/acmesh-official/acme.sh
v3.0.5
[Wed Aug 31 11:59:21 UTC 2022] Running cmd: setnotify
[Wed Aug 31 11:59:21 UTC 2022] Using config home:/acme.sh
[Wed Aug 31 11:59:21 UTC 2022] default_acme_server='https://acme-v02.api.letsencrypt.org/directory'
[Wed Aug 31 11:59:21 UTC 2022] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
[Wed Aug 31 11:59:21 UTC 2022] _ACME_SERVER_HOST='acme-v02.api.letsencrypt.org'
[Wed Aug 31 11:59:21 UTC 2022] _ACME_SERVER_PATH='directory'
[Wed Aug 31 11:59:21 UTC 2022] Set notify hook to: customscript
[Wed Aug 31 11:59:21 UTC 2022] Sending via: customscript
[Wed Aug 31 11:59:21 UTC 2022] Found for customscript
[Wed Aug 31 11:59:21 UTC 2022] Can not find the hook file for customscript
Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade
If it's still not working, please provide the log with --debug 2
, otherwise, nobody can help you.
Please upgrade to the latest code and try again first. Maybe it's already fixed.
acme.sh --upgrade
If it's still not working, please provide the log with--debug 2
, otherwise, nobody can help you.
Already up to date and the issue persists.
who told you to use in this way?
sorry, that code was not added yet.
you can just copy your script to ~/.acme.sh/notify/
and use:
acme.sh --set-notify --notify-hook yourscript
Can we get https://github.com/acmesh-official/acme.sh/pull/4193 merged? Please and thank you!
sorry, that code was not added yet. you can just copy your script to
~/.acme.sh/notify/
and use:
acme.sh --set-notify --notify-hook yourscript
Nope, it doesn't work as described, acme.sh says:
[Do 25. Apr 17:02:11 CEST 2024] It seems that your api file is not correct, it must have a function named: yourscript_send
[Do 25. Apr 17:02:11 CEST 2024] Set /root/.acme.sh/notify/yourscript.sh error.
[Do 25. Apr 17:02:11 CEST 2024] Can not set notify hook to: yourscript
I can confirm that #4193 works, and would really like to see it in an upcoming release. Why is this issue closed anyway? It is totally valid issue, since it doesn't work in the way the wiki says.
I am having an issue with this instructions:
$ acme.sh --set-notify --notify-hook customscript
[Sat Jul 6 22:33:17 BRT 2024] Set notify hook to: customscript
[Sat Jul 6 22:33:17 BRT 2024] Sending via: customscript
[Sat Jul 6 22:33:17 BRT 2024] Can not find the hook file for customscript
The current instruction is not working :-(
@pkoevesdi, How did you make it work?
You need the script https://raw.githubusercontent.com/acmesh-official/acme.sh/c327b888c12904c76a4c504f341e32f07a33b973/notify/customscript.sh
in your folder notify
, then it works as written in https://github.com/acmesh-official/acme.sh/pull/4193.