Originally created by @ezbik on GitHub (Jan 30, 2017).
After upgrade to new release with new hooks, it is required to edit your hook.sh manually and insert those new empty hook functions. Without this, everything is broken:
$ ./dehydrated -c
# INFO: Using main config file /var/lib/le/config
Processing x.org with alternative names: y.org z.org
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Apr 14 09:21:00 2017 GMT (Longer than 30 days). Skipping renew!
/var/lib/le/hook.sh: 130: /var/lib/le/hook.sh: exit_hook: not found
Originally created by @ezbik on GitHub (Jan 30, 2017).
After upgrade to new release with new hooks, it is required to edit your `hook.sh` manually and insert those new empty hook functions. Without this, everything is broken:
```
$ ./dehydrated -c
# INFO: Using main config file /var/lib/le/config
Processing x.org with alternative names: y.org z.org
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Apr 14 09:21:00 2017 GMT (Longer than 30 days). Skipping renew!
/var/lib/le/hook.sh: 130: /var/lib/le/hook.sh: exit_hook: not found
```
Is it possible to modify behavior of hook handling, so that if a hook function is not defined then ignore it?
@ezbik commented on GitHub (Jan 30, 2017):
Is it possible to modify behavior of hook handling, so that if a hook function is not defined then ignore it?
The problem is in the hook script, I'm planning on making the example hook better, ignoring unknown hooks instead of throwing errors, but for now the best fix is to just add the exit_hook from the example script to your own script.
@lukas2511 commented on GitHub (Jan 30, 2017):
The problem is in the hook script, I'm planning on making the example hook better, ignoring unknown hooks instead of throwing errors, but for now the best fix is to just add the exit_hook from the example script to your own script.
This fix of course doesn't magically fix old modified example hook scripts, you'll have to add the change yourself, but it will ensure this problem doesn't occur again in the future.
@lukas2511 commented on GitHub (Jan 30, 2017):
This fix of course doesn't magically fix old modified example hook scripts, you'll have to add the change yourself, but it will ensure this problem doesn't occur again in the future.
Thanks for looking into this, but your commit e545292 complicates it even more -- to sync between old and new hook.sh , a pattern list must be inserted/updated too.
Isn't it be better to let user only edit his scripts and not play with hook.sh?
E.g. by expecting user scripts in folders like ./hook/${hook_function_name}.d/, and running them via run-parts with exporting required variables?
@ezbik commented on GitHub (Jan 30, 2017):
Thanks for looking into this, but your commit e545292 complicates it even more -- to sync between old and new `hook.sh` , a pattern list must be inserted/updated too.
Isn't it be better to let user only edit **his** scripts and not play with `hook.sh`?
E.g. by expecting user scripts in folders like `./hook/${hook_function_name}.d/`, and running them via `run-parts` with exporting required variables?
Switching to a directory and run-parts would change everything completely, and this pattern list is just part of the example hook, other hook scripts probably never had any problems, and this way I can add new hooks without the example script failing again, I think this is a good and easy solution for this problem. If you ever want to make use of a new hook you just have to add it to the list and write a handler function, don't see any problem with that.
@lukas2511 commented on GitHub (Jan 30, 2017):
Switching to a directory and run-parts would change everything completely, and this pattern list is just part of the example hook, other hook scripts probably never had any problems, and this way I can add new hooks without the example script failing again, I think this is a good and easy solution for this problem. If you ever want to make use of a new hook you just have to add it to the list and write a handler function, don't see any problem with that.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ezbik on GitHub (Jan 30, 2017).
After upgrade to new release with new hooks, it is required to edit your
hook.shmanually and insert those new empty hook functions. Without this, everything is broken:@ezbik commented on GitHub (Jan 30, 2017):
Is it possible to modify behavior of hook handling, so that if a hook function is not defined then ignore it?
@lukas2511 commented on GitHub (Jan 30, 2017):
The problem is in the hook script, I'm planning on making the example hook better, ignoring unknown hooks instead of throwing errors, but for now the best fix is to just add the exit_hook from the example script to your own script.
@lukas2511 commented on GitHub (Jan 30, 2017):
This fix of course doesn't magically fix old modified example hook scripts, you'll have to add the change yourself, but it will ensure this problem doesn't occur again in the future.
@ezbik commented on GitHub (Jan 30, 2017):
Thanks for looking into this, but your commit
e545292complicates it even more -- to sync between old and newhook.sh, a pattern list must be inserted/updated too.Isn't it be better to let user only edit his scripts and not play with
hook.sh?E.g. by expecting user scripts in folders like
./hook/${hook_function_name}.d/, and running them viarun-partswith exporting required variables?@lukas2511 commented on GitHub (Jan 30, 2017):
Switching to a directory and run-parts would change everything completely, and this pattern list is just part of the example hook, other hook scripts probably never had any problems, and this way I can add new hooks without the example script failing again, I think this is a good and easy solution for this problem. If you ever want to make use of a new hook you just have to add it to the list and write a handler function, don't see any problem with that.