summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2017-03-18 21:55:37 (GMT)
committerSven Nierlein <sven@nierlein.de>2018-10-22 14:30:31 (GMT)
commita793540bbb9029069eab3c63fbb82971e2cb9fef (patch)
treebd8fe0866fa86dc92b6ceaab8617701bff7dc503 /plugins/check_curl.c
parent5f9e8fa1e7908616be267acd7b57700d60276229 (diff)
downloadmonitoring-plugins-a793540bbb9029069eab3c63fbb82971e2cb9fef.tar.gz
check_curl: support check_http arguments for backwards compatibility
Diffstat (limited to 'plugins/check_curl.c')
-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 20ac5b7..ccbc6a8 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)