When installing packages with daemons, they often restart that service during installation/upgrade on Debian.
I got a daemon that has some options that can only be set on runtime, not configured. If the Debian package was under my control, I'd change the init-script so it contained a function to set those options and calls it after (re)starting the service.
As this daemon is from a remote repository and I don't want to build my own deb, I need a solution that does not change any files contained in the package(to avoid problems when updating the package via dpkg/apt).
So, is there a possibility to hook into that process to execute some commands or a script after the restart of that service in a clean way?