I am working on a package for YunoHost that involves modifying Postfix configurations. During the installation process, I have encountered a challenge with the
conf_regen hook’s execution timing.
conf_regen hook, along with other hooks, is copied to the disk only towards the end of the installation process. For the package requirements, I’d like that
conf_regen is executed before the installation completes. When the installation script executes
yunohost tools regen-conf, the hook, not yet copied at this stage, is not considered.
Also, I’m open to exploring alternatives:
- Implementing a one-shot post-installation script to trigger the required configuration changes.
- Using a command like
yunohost hook exec, though I have faced challenges in its effective execution (tbh I don’t understand how it works).
Iv’e noticed, in the
app_install function, operations related to cleaning hooks, setting permissions, and invoking
hook_callback. Unless I misunderstood, it appears these are for hooks already installed.
Thanks for any help you can provide me.