Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2017 10:18:33 +0200
From:      Guido Falsi <mad@madpilot.net>
To:        Miroslav Lachman <000.fbsd@quip.cz>, Matthias Fechner <idefix@fechner.net>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: Should a package restart on upgrade itself
Message-ID:  <2678b33c-78c9-5e34-3ae6-434e1f176518@madpilot.net>
In-Reply-To: <595296BF.3040906@quip.cz>
References:  <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net> <595296BF.3040906@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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@madpilot.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2678b33c-78c9-5e34-3ae6-434e1f176518>