On Thu, 2025-10-02 at 10:23 +0700, Arnaud Rebillout wrote: > AFAIK, there are 2 ways to create the miniflux admin account: > - use `-create-admin`, but now it needs a TTY > - use variables in the config file, but then we need to start the > miniflux daemon for it to take effect > > It seems that none are good for a postinst script... > > My impression is that we could ask for a change upstream. There's no > need to insist on a TTY on stdin, they could change their code to > support something like `echo user\npass\n | miniflux -create-admin`. > > In term of implementation, instead of proactively checking for a TTY via > `term.IsTerminal(fd)` (cf. [1]), maybe it's possible to handle errors > from either NewReader or ReadString. There should be some specific error > if stdin is closed. > > What do you think?
I reckon the best approach is patching miniflux for now, either reverting upstream's change or adding a separate non-interactive way to create an admin account (something like "miniflux -create-admin- noninteractive"). postinst could also directly manipulate the PostgreSQL database and create an account there, but that sounds sketchy at best and is prone to breakage. -- Maytham
signature.asc
Description: This is a digitally signed message part

