liske / needrestart

Restart daemons after library updates.
GNU General Public License v2.0
420 stars 67 forks source link

Suggestion: add a short HowTo notify via email for noobs #265

Open zilexa opened 1 year ago

zilexa commented 1 year ago

I am no developer or expert, but I would like to run needrestart as part of a monthly bash script run via cron. I see there is already functionality in there that allows emails to be sent. On my system (Manjaro Gnome), the system can already sent emails using mail -s "mail subject here" default.

But I cannot figure out how to run needrestart in such a way that it will sent me an email if the system would need a restart after performing updates?

The commandline options don't mention anything, even though there is a "600-mail" script. The config file doesn't show anything useful about this. The readme.needrestart doesn't seen to add any useful info about how to make it sent emails. I am sure its clear for experts how to do it, because most likely this is all part of some sort of methodology. But I am in the dark.

If anyone would be willing to shine a little light, that would be appreciated.

liske commented 1 year ago

Please be aware of the description in notify.d/README.md (regarding 600-mail):

Files located in /etc/needrestart/notify.d are used to notify running
user sessions about usage of outdated libraries.

Needrestart has no built-in notification function for system services.

zilexa commented 1 year ago

My point is the documentation is waaay too limited to make sense for non-developer new users.