needrestart icon indicating copy to clipboard operation
needrestart copied to clipboard

Whitelist service option

Open helmo opened this issue 5 years ago • 4 comments

Is there a way to whitelist services? ... meaning they may be restarted without confirmation. This could be useful for non-critical services such as fail2ban which may be restarted without asking.

I've seen blacklist options and a flag to restart all services automatically ... but not the inverse.

Please correct me if I'm wrong here.

helmo avatar Oct 19 '18 07:10 helmo

This is not possible, yet. I've flagged it with wishlist since it might make needrestart less annoying for services known to be save to restarted.

liske avatar Oct 28 '18 18:10 liske

Hey, just chipping in to say that this (or any method of restarting stuff noninteractively) would be of immense help for us!

I've added needrestart to our monitoring system to report on the manual intervention that's necessary after automatic upgrades, and I have >20 Machines with a ton of services that need a restart. I would like to avoid having to log in to each of these machines just to type the command and press enter.

I was under the impression that needrestart -f noninteractive -r a would do precisely this (restarting services that are selected by default), but to my surprise, I was wrong.

lukasjuhrich avatar Dec 12 '20 10:12 lukasjuhrich

The automatic mode (-r a) should indeed restart any services which are not blacklisteted in $nrconf{override_rc}.

liske avatar Dec 25 '20 16:12 liske

The automatic mode (-r a) should indeed restart any services which are not blacklisteted in $nrconf{override_rc}.

Oh, thanks, you're right. I didn't use ansible correctly and misinterpreted the error.

lukasjuhrich avatar Dec 25 '20 19:12 lukasjuhrich