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

Closed
opened 2025-12-29 01:27:38 +01:00 by adam · 2 comments
Owner

Originally created by @kjpetrie on GitHub (Feb 20, 2023).

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).

  :
}

Originally created by @kjpetrie on GitHub (Feb 20, 2023). 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). : } ```
adam closed this issue 2025-12-29 01:27:38 +01:00
Author
Owner

@lukas2511 commented on GitHub (Feb 20, 2023):

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.

@lukas2511 commented on GitHub (Feb 20, 2023): 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.
Author
Owner

@kjpetrie commented on GitHub (Feb 20, 2023):

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.

@kjpetrie commented on GitHub (Feb 20, 2023): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#597