Force service restart after package deinstallation and subsequent installation
I build packages for devices that are controlled remotely. This
includes activating and deactivating components installed on them.
Each component is packed into separate deb. Due to some (unfortunate?)
decisions, deactivated modules are uninstalled - this can't be
avoided. My problem is that after deinstallation and subsequent
installation service are not restarted - they are either masked or
disabled (I still don't know why, but I'm getting there - this mail is
part of it). Due to other decisions they also cannot be purged.
My question is: how can I ensure that after package reinstallation
service will be automatically restarted. I see three solutions:
1. Rethink uninstallation and also run `dpkg -P`
2. Modify each and every debian/rules script and use `override_dh_???`
to run `dh_??? unmask/enable` - I don't know how to do it honestly.
3. Modify preinstall script in each package and unmask/enable by hand.
Is there any better way to do this?
Thanks in advance.
I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.