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

0

FYI To be asked by installer what to do with old configuration files, those files must be listed in /DEBIAN/conffiles file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.