On Tue, Jun 27, 2017 at 06:29:24PM +0200, Matthias Fechner wrote:
> 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?
> 
A package self upgrading might cause issues: plugins not yet updated (hi
dovecot), or services requiring an upgrade procedure. So activating a self
restart of the service by default is a bad idea.

service -R command can simplify the procedure for the admin given it restarts
all services already started.

Another option is to activate an option of pkg(8) off by default:
HANDLE_RC_SCRIPTS = true;
in /usr/local/etc/pkg.conf

which will automatically restart the services on upgrade.

In the futur it is planed to move this into a trigger (executed at the end of
the entire upgrade process) which will solve the "dovecot" issue, but not the
one where upgrading requires a procedure.

Best regards,
Bapt

Attachment: signature.asc
Description: PGP signature

Reply via email to