Should a package restart on upgrade itself

Guido Falsi mad at
Wed Jun 28 08:18:45 UTC 2017

On 06/27/17 19:32, Miroslav Lachman wrote:
> Matthias Fechner wrote on 2017/06/27 18:29:
>> Dear all,
>> it is always a pain if pkg upgrade a lot of packages to restart all
>> services to make sure update/security fixes are applied to all running
>> services.
>> Is there an option in pkg that it restart services automatically or is
>> it OK if I would add a post-install script to the packages (I maintain)
>> that will include a "service foo restart"?
>> What is best practice here?
> Please don't do this.
> Some ports did this in the past and this was really a pain during larger
> upgrades. It sometimes leave services stopped (hi MySQL).

I subscribe to this comment. I also got burned in the past by this
behavior(which luckily is no more present).

I'd like to also comment that pkg should just do it's work, managing
packages, if you want to automate system maintenance, there are specific
tools for that (like puppet, ansible, cfengine, chef...and others I
can't name right away).

Coding parts of software configuration management in pkg is not a good
idea IMHO.

Guido Falsi <mad at>

More information about the freebsd-ports mailing list