pkg upgrade and service restart

I have been using FreeBSD and pkg(8) for a few years now. I'm still a newbie, but I have developed opinions! And being a member of this forum means I get to share them with you as well!

Let's say we're upgrading packages such as postfix, dovecot, and/or php84. The associated services - postfix, dovecot and php_fpm - are not automatically restarted, nor is there any mention in the output from the pkg upgrade command that these need to be manually restarted, as far as I can remember.

My opinion is that this is an omission. While I can see good arguments not to automatically restart these services as part of pkg upgrade, the necessary service restart commands should be mentioned in the output and/or perhaps there should be another pkg or service command that you can run after pkg upgrade to restart all the necessary services.

Have I missed something? (Not unlikely ...!) Or does my opinion make sense?
 
I don't use it myself but I am aware of this sysutils/checkrestart, basically you run it after your pkg upgrade and like the name implies it tells you what service need to be restarted.
Thank you, I had not heard of this before. I tested it out just now, and it flagged a handful of services it thought might need restarting. However, I suspect at least some were false positives.

It would be much better if the functionality in sysutils/checkrestart was available from the service command, and if it were a bit more reliable.

From the BUGS section of the checkrestart man page:
checkrestart may report both false positives and false negatives,
depending on program and kernel behaviour, and should be considered
strictly "best-effort".
 
HANDLE_RC_SCRIPTS: boolean
When enabled, this option will automatically perform
start/stop of services during package installation and
deinstallation. Services are only started on installation
if they are enabled in /etc/rc.conf. Default: NO.
Maybe this (from man pkg.conf) is about automatic restarting.
 
dbdemon Check this if you are interested:
https://github.com/freebsd/pkg/pull/2290
See this thread for more info
 
dbdemon Check this if you are interested:
https://github.com/freebsd/pkg/pull/2290
See this thread for more info
Thank you! It seems I'm not the only one who saw a need for something like this. But it doesn't seem the PR is going anywhere as there are no comments since August last year. Or maybe it's common for FreeBSD PRs to sit around a while before they're approved and merged? Maybe I will bump that other thread or the PR to help keep it on the radar of the Commit Bit Elders of FreeBSD.
 
Back
Top