nagios-plugins
nagios-plugins copied to clipboard
Fix exit status of systemctl by relocating the grep pipe.
The grep pipe was making the exit status of "systemctl status ..." always 0, returning OK to nagios when the service was not running.
The real problem is that grep -i Active
also matches "inactive", I think.