-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deactivate temporally needrestart during a system upgrade #71
Comments
Gentle ping ;-) |
It is currently not possible to override needrestart's behavior (w/o changing config files). You could prevent needrestart to restart any services by using Debian's policy layer ( A way to implement such a feature might be to add a checking for an environment variable within |
@liske Thank you a lot, it confirms what we are thinking to do. Regards. |
@GMLudo A MR implementing this feature would be highly appreciated! |
This feature would be really helpful. I would write it in the described way, but my last perl experience was 15 years ago ... so better not. |
We've also come up with a different method: Put this in
Now it doesn't interrupt One problem with this is that Another alternative to consider is to use I don't think just modifying
Also does the trick, apparently. Personally, I'd like to see a clean, simple and supported way to avoid |
What we actually ended up doing was:
|
You now can disable to apt-get hook which runs needrestart if a package was installed or updated by setting the environment variable NEEDRESTART_SUSPEND to a non-empty value. Should work with ansible's |
You can also add |
this gives me ERROR: Unknown restart option 'automatically'! (it works but logs the error) But "NEEDRESTART_SUSPEND=y" works without logging an error (message that restart is suspended) |
Hi,
Thanks a lot for needrestart, we install this package by default on all Debian servers.
However, we have a small question: We use also Ansible to upgrade and deploy new software on the servers.
Time to time, we would avoid to restart all daemons just after the upgrade and we want to launch needrestart after the end of playbook.
Is it possible to pass a parameter to disable temporally needrestart via an environment variable for example ?
I see nothing like that inside the hooks for apt and dpkg.
Thanks for your answer.
Regards.
The text was updated successfully, but these errors were encountered: