summaryrefslogtreecommitdiffstats
path: root/plugins/check_by_ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_by_ssh.c')
-rw-r--r--plugins/check_by_ssh.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 04bce38..485bf3b 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -100,6 +100,13 @@ main (int argc, char **argv)
100 100
101 result = cmd_run_array (commargv, &chld_out, &chld_err, 0); 101 result = cmd_run_array (commargv, &chld_out, &chld_err, 0);
102 102
103 if (verbose) {
104 for(i = 0; i < chld_out.lines; i++)
105 printf("stdout: %s\n", chld_out.line[i]);
106 for(i = 0; i < chld_err.lines; i++)
107 printf("stderr: %s\n", chld_err.line[i]);
108 }
109
103 if (skip_stdout == -1) /* --skip-stdout specified without argument */ 110 if (skip_stdout == -1) /* --skip-stdout specified without argument */
104 skip_stdout = chld_out.lines; 111 skip_stdout = chld_out.lines;
105 if (skip_stderr == -1) /* --skip-stderr specified without argument */ 112 if (skip_stderr == -1) /* --skip-stderr specified without argument */
@@ -223,7 +230,6 @@ process_arguments (int argc, char **argv)
223 timeout_interval = atoi (optarg); 230 timeout_interval = atoi (optarg);
224 break; 231 break;
225 case 'H': /* host */ 232 case 'H': /* host */
226 host_or_die(optarg);
227 hostname = optarg; 233 hostname = optarg;
228 break; 234 break;
229 case 'p': /* port number */ 235 case 'p': /* port number */
@@ -322,7 +328,6 @@ process_arguments (int argc, char **argv)
322 if (c <= argc) { 328 if (c <= argc) {
323 die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname); 329 die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname);
324 } 330 }
325 host_or_die(argv[c]);
326 hostname = argv[c++]; 331 hostname = argv[c++];
327 } 332 }
328 333