I have a problem with postinst script, I have to ask root password for MySQL to create some user for my application. I know, it's bad practice to use db_input in postinst however I really need it. Why this postinst doesn't work when I install my app form repository but works properly when I install it as .deb package?
postinst:
#!/bin/bash -e
. /usr/share/debconf/confmodule
db_input high my_app/mysql_root_password || true
db_go
error:
dpkg: error processing my-app (--configure):
subprocess installed post-installation script returned error exit status 30
configured to not write apport reports
Errors were encountered while processing:
my-app
E: Sub-process /usr/bin/dpkg returned an error code (1)