Install prosody in an unattended script

First of all, thank you for your effort and work!

I use a script to install prosody, but when I do apt-get install prosody -y it asks me:

Reading package lists... Done
Building dependency tree
Reading state information... Done
prosody is already the newest version (0.11.9-1~buster1).
The following package was automatically installed and is no longer required:
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up prosody (0.11.9-1~buster1) ...

Configuration file '/etc/prosody/prosody.cfg.lua'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** prosody.cfg.lua (Y/I/N/O/D/Z) [default=N] ?

How can I pass the answer to that question, if it is in a script?
Thanks for any help

apt-get -y install prosody -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
1 Like

On the one hand, thank you. I lost count of how many times he helped me. On the other hand, where do you get all this information?

1 Like