Version: 2.1.0
hooks
Hooks
HiTechCloud supports hooks that run bash scripts before or after running hitechcloudcli commands.
To create a hook, first create a new directory: /etc/hitechcloud/hitechcloud/hooks/ and inside create a file based on the desired command:
pre_prefix for script to run before a command.post_prefix for a script to run after executing an hitechcloudcli command.
Example, to run a custom script before the user creation process (hitechcloudcli user-add) you would create a new file:
pre_user-add.sh
another example, script that executes after adding a domain (hitechcloudcli domains-add) you would create file:
post_domains-add.sh
any command-line attributes passed to hitechcloudcli script will also be to your custom scripts.
Was this helpful?