dehydrated-io / dehydrated

letsencrypt/acme client implemented as a shell-script – just add water
https://dehydrated.io
MIT License
5.96k stars 716 forks source link

hook.sh: line 217: $1: unbound variable #903

Closed kjpetrie closed 1 year ago

kjpetrie commented 1 year ago

Attempting to renew with LetsEncrypt in FreeBSD 13.1-RELEASE-p7 produces the error: /usr/local/etc/dehydrated/hook.sh: line 217: $1: unbound variable

Line 217 appears to be the following function:

startup_hook() {
  # This hook is called before the cron command to do some initial tasks
  # (e.g. starting a webserver).

  :
}
lukas2511 commented 1 year ago

Can you give any more details? From what I see the hook scripts aren't even configured by default in the freebsd dehydrated port. And the hook script should never be called without an argument so $1 should always be defined.

kjpetrie commented 1 year ago

Thank you! It seems a new FreeBSD package built by my poudriere on 17th January inserted a hook.sh script which was called automatically since I have /usr/local/etc/dehydrated configured as CONFG_D. Without that the config files including domains.txt can't be found.