mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-19 11:31:11 +02:00
Created a wiki page detailing how to use multiple hooks
@@ -0,0 +1,13 @@
|
|||||||
|
Although Dehydrated does not allow you to specify multiple hooks this behavior can be easily hacked together.
|
||||||
|
|
||||||
|
This can be done by creating a "proxy" hook that calls the multiple hooks you wish to execute. The simplest way to do this is with a bash script that uses `$@` to pass all command line arguments to any hooks you wish to excecute:
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Simple script which allows the use of multiple hooks
|
||||||
|
# Put hooks in the order you wish them to be called here:
|
||||||
|
# (Be sure to keep in mind the working directory *this* hook will be called from when specifying other hook paths.)
|
||||||
|
./hooks/cloudflare/hook.py "$@" # Hook for automatic DNS-01 challenge deployment on Cloudflare
|
||||||
|
./hooks/custom/reboot.py "$@" # Made up hook which reboots a made up Nginx server
|
||||||
|
```
|
||||||
|
|
||||||
|
Then all you have to do is specify the proxy hook with either the `HOOK` key in a configuration file or the `-k` command line argument.
|
||||||
Reference in New Issue
Block a user