From a793540bbb9029069eab3c63fbb82971e2cb9fef 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 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) 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 v0.10-9-g596f