mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 09:40:05 -04:00
Exit with 0 in JSON-format if everything else works
This commit is contained in:
parent
5acd14fcfb
commit
24172ca0e0
1 changed files with 4 additions and 0 deletions
|
|
@ -413,6 +413,10 @@ void mp_print_output(mp_check check) { puts(mp_fmt_output(check)); }
|
|||
*/
|
||||
void mp_exit(mp_check check) {
|
||||
mp_print_output(check);
|
||||
if (check.format == MP_FORMAT_TEST_JSON) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
exit(mp_compute_check_state(check));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue