Reconfigure debian package when a dependency is reconfigured

2

I've got the following situation: my debian package depends on postgresql and contains a systemd service which depends on postgresql service.

(I suppose) At the moment postgresql updates my service is stopped and masked by systemd due to the fact that postgresql service is removed.

Is there a way I can tell debian to automatically reconfigure my package when postgresql is updated?

UPDATE: Probably this can be done through apt config files

norekhov

Posted 2016-11-25T15:13:27.550

Reputation: 131

yep it can - but i think using dpkg-triggers would be simplier - have a look at this: http://stackoverflow.com/a/15276537 it should be possible to apply on your case by watching systemd service file directories.

– Marek Rost – 2016-11-25T15:46:29.697

Answers

0

You can reconfigure your package through:

sudo dpkg-reconfigure <package_name>

GAD3R

Posted 2016-11-25T15:13:27.550

Reputation: 2 677

Yes, I understand that. The question is about automatic updates. When (for example) at 3am automatic updater updates postgres my package need to be reconfigured. Is there something I can write in a control file to force reconfigure when dependency reconfigures? – norekhov – 2016-11-25T15:38:34.383