From 572a22a2b56837bbc7326a98ae32743a29600147 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sat, 18 Mar 2017 22:55:37 +0100 Subject: check_curl: support check_http arguments for backwards compatibility --- plugins/check_curl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) if (argc < 2) return ERROR; + /* support check_http compatible arguments */ + for (c = 1; c < argc; c++) { + if (strcmp ("-to", argv[c]) == 0) + strcpy (argv[c], "-t"); + if (strcmp ("-hn", argv[c]) == 0) + strcpy (argv[c], "-H"); + if (strcmp ("-wt", argv[c]) == 0) + strcpy (argv[c], "-w"); + if (strcmp ("-ct", argv[c]) == 0) + strcpy (argv[c], "-c"); + if (strcmp ("-nohtml", argv[c]) == 0) + strcpy (argv[c], "-n"); + } + while (1) { 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); if (c == -1 || c == EOF || c == 1) -- cgit v1.2.3-74-g34f1