summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2017-03-18 22:55:37 +0100
committerSven Nierlein <sven@nierlein.de>2017-03-18 23:18:42 +0100
commit572a22a2b56837bbc7326a98ae32743a29600147 (patch)
treea7519830fdf789229f6fe3a64102bd9d63c2d922
parent6e18c3c09672e40ffb6885e9b76429a972d364cd (diff)
downloadmonitoring-plugins-572a22a.tar.gz
check_curl: support check_http arguments for backwards compatibility
-rw-r--r--plugins/check_curl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 20ac5b71..ccbc6a8b 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -573,6 +573,20 @@ process_arguments (int argc, char **argv)
573 if (argc < 2) 573 if (argc < 2)
574 return ERROR; 574 return ERROR;
575 575
576 /* support check_http compatible arguments */
577 for (c = 1; c < argc; c++) {
578 if (strcmp ("-to", argv[c]) == 0)
579 strcpy (argv[c], "-t");
580 if (strcmp ("-hn", argv[c]) == 0)
581 strcpy (argv[c], "-H");
582 if (strcmp ("-wt", argv[c]) == 0)
583 strcpy (argv[c], "-w");
584 if (strcmp ("-ct", argv[c]) == 0)
585 strcpy (argv[c], "-c");
586 if (strcmp ("-nohtml", argv[c]) == 0)
587 strcpy (argv[c], "-n");
588 }
589
576 while (1) { 590 while (1) {
577 c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:j:I:a:p:s:R:r:u:f:C:J:K:S::m:NE", longopts, &option); 591 c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:j:I:a:p:s:R:r:u:f:C:J:K:S::m:NE", longopts, &option);
578 if (c == -1 || c == EOF || c == 1) 592 if (c == -1 || c == EOF || c == 1)