You know, application parameters are visible with the debconf-get-selections command. those. debconf-get-selections | grep myapp
Suppose two options are available for your deb package, so you can perform a silent installation as follows:
echo myapp myapp/param1 string 8888 | debconf-set-selections echo myapp myapp/param2 boolean true | debconf-set-selections DEBIAN_FRONTEND=noninteractive dpkg -i blablabla.deb
Now you can use param1 and param2 in your preinst and postinst.
source share