Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 18:35:02 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Matthias Fechner <idefix@fechner.net>
Cc:        FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: Should a package restart on upgrade itself
Message-ID:  <20170627163502.u2m4trqccbkri63j@ivaldir.net>
In-Reply-To: <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net>
References:  <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--3x77s4hpnh5fjcnu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 27, 2017 at 06:29:24PM +0200, Matthias Fechner wrote:
> Dear all,
>=20
> 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.
>=20
> 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"?
>=20
> What is best practice here?
>=20
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 restar=
ts
all services already started.

Another option is to activate an option of pkg(8) off by default:
HANDLE_RC_SCRIPTS =3D 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 t=
he
one where upgrading requires a procedure.

Best regards,
Bapt

--3x77s4hpnh5fjcnu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAllSiTMACgkQY4mL3PG3
Plr+BRAAsBQvA2X/sKgET7C7Z8zeV6SRRuW7ssJ+W7zcvjGVyiyFq5co3bMWxP6J
DtbLr9eTag9620Duic/e8S68cJWkb/47l2QoP1SOFQEkIaxAslNOcsnHsZBHUi7M
IcM2ZyU/nOipo9xXA8754M5lNoyougkyegp4pNmyNzgMpNw7vmgMAlgJgPf0WzgQ
THhNlWIbRI53NnECrHz/EpvCY3A6tKuYDtrCFDGz1fxysufCXXTGMOV56ohZOVcy
s/UwhkZFBT+T6tRYDMlrUw2BFoSg73KlbJkD6juKX4xjOG3w6h9/bNmqOw3UJM27
qXMQqFJh61XDhDH5P+qiJ7FCvdkuHK18+EbI3H4AxrGcCNqLG59RLEXUufrVeKrN
VG8TGLXgqi5LvjvXA3cTAw4veUEZ38p5eNbZSwyHJxl5UITtuEjW5vOWYYnBkLVO
6UkbqnYWykJUB4aZvVA8z6l9jPotU3W2x4qdLzZbcXMYnTYSiALYwyto5UA1Bcoz
kedL8MGHiLk3EdNenTmGhkeCUg7u8pX7vm4nNqqUNeiqNLxrbKcshjKDatIUg0HP
Lv5IObWrm7XiHdGkKAlLinhqj0jP+9vT1SEj/IFOH94mQRa5awEirVTZuR1LjfKZ
Luaqrg1YatFI960IS0OkCaN93SM8X2vYSS/EfuvHKJH4Owm1j0Y=
=u446
-----END PGP SIGNATURE-----

--3x77s4hpnh5fjcnu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170627163502.u2m4trqccbkri63j>