Bug#794099: optional non-zero exit codes in case of restart(s) required
closing "support" ticket. Am 16.09.2015 um 23:15 schrieb Thomas Liske: > Hi Patrick, > > On Thu, Jul 30, 2015 at 01:57:25PM +, Patrick Schleizer wrote: >> Package: needrestart >> Severity: wishlist >> >> When running 'needrestart' from a terminal or script, it would be useful >> to have some command line parameter to make it exit non-zero, in case >> any restart(s) are required. > did you give the nagios plugin mode (-p) a try (see also > README.nagios.md)? It will set the RC code to non-zero if a restart is > required. Could be combined with -l or -k to look only for outdated > libraries or kernel usage: > > # needrestart -p ; echo "RC=$?" > WARN - Kernel: 4.1.3-tl1+, Services: none, Containers: none, Sessions: 1 > (!)|Kernel=0;0;;0;2 Services=0;;0;0 Containers=0;;0;0 Sessions=1;0;;0 > RC=1 > > > HTH, > Thomas > > -- > > :: WWW:https://fiasko-nw.net/~thomas/ :: >::: Jabber: xmpp:tho...@jabber.fiasko-nw.net ::: > :: flickr: https://www.flickr.com/photos/laugufe/ :: -- /* Mit freundlichem Gruß / With kind regards, Patrick Matthäi GNU/Linux Debian Developer Blog: http://www.linux-dev.org/ E-Mail: pmatth...@debian.org patr...@linux-dev.org */
Bug#794099: optional non-zero exit codes in case of restart(s) required
Hi Patrick, On Thu, Jul 30, 2015 at 01:57:25PM +, Patrick Schleizer wrote: > Package: needrestart > Severity: wishlist > > When running 'needrestart' from a terminal or script, it would be useful > to have some command line parameter to make it exit non-zero, in case > any restart(s) are required. did you give the nagios plugin mode (-p) a try (see also README.nagios.md)? It will set the RC code to non-zero if a restart is required. Could be combined with -l or -k to look only for outdated libraries or kernel usage: # needrestart -p ; echo "RC=$?" WARN - Kernel: 4.1.3-tl1+, Services: none, Containers: none, Sessions: 1 (!)|Kernel=0;0;;0;2 Services=0;;0;0 Containers=0;;0;0 Sessions=1;0;;0 RC=1 HTH, Thomas -- :: WWW:https://fiasko-nw.net/~thomas/ :: ::: Jabber: xmpp:tho...@jabber.fiasko-nw.net ::: :: flickr: https://www.flickr.com/photos/laugufe/ ::
Bug#794099: optional non-zero exit codes in case of restart(s) required
Package: needrestart Severity: wishlist When running 'needrestart' from a terminal or script, it would be useful to have some command line parameter to make it exit non-zero, in case any restart(s) are required. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org