1

I'm building .deb packages for my internal tools. And would like to find a right way how to deal with configuration files on upgrade.

Currently when I install package-0.2.deb over package-0.1.deb, using apt install ./package-0.2.deb it replaces my existing configuration files in /etc/package/*

Instead, I would like to ask user what to do with old modified conf file (Replace, Keep, etc., like it works e.g. in nginx) by adding postinst or preinst control files. But can't find a common way how to do it other package maintainers.

Package dir structure /DEBIAN/control /etc/package/package.conf /usr/bin/package

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.