Dne 16.2.2018 v 15:35 Chris Adams napsal(a):
What's the proper way to fix this? I can update the package to
create a
user and use it in the default config, but is it correct to have a %post
that changes the existing config (something like a "sed -i")?
I'd also like to switch it from running in daemon mode to foreground
mode (and change the systemd unit to match), but again, that requires
editing the config; there's no command-line option for either of these.
I'm not sure of the "best practice" here... as a system admin, it feels
wrong to have RPM scriptlets editing config, but I don't see another way
forward, short of modifying the program to accept command-line overrides
for these options (which has its own "fun").
RPM scriptlets should not try to convert the config. Let the sysadmin do that.
I recommend:
rpmconf -a
or
rpmconf -o imapproxy
Miroslav