diff options
author | Robin Sonefors <robin.sonefors@op5.com> | 2013-05-10 15:21:34 (GMT) |
---|---|---|
committer | Jacob Hansen <jhansen@op5.com> | 2019-03-21 12:54:19 (GMT) |
commit | 2bc4cc99d2c3fdbbd06af862cb0ae1098895f860 (patch) | |
tree | cb38d9d84d3c2118d7904a38919afa2744eef22d /plugins/check_mysql.c | |
parent | 97bb142b144c7ae128cc69033e620906c95562c8 (diff) | |
download | monitoring-plugins-2bc4cc99d2c3fdbbd06af862cb0ae1098895f860.tar.gz |
check_mysql: Allow sockets to be specified to -Hrefs/pull/1587/head
The help text says that -H accepts a "unix socket (must be an absolute
path)". Now that actually corresponds to reality.
Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Diffstat (limited to 'plugins/check_mysql.c')
-rw-r--r-- | plugins/check_mysql.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 5773afd..0cba50e 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c | |||
@@ -379,6 +379,9 @@ process_arguments (int argc, char **argv) | |||
379 | if (is_host (optarg)) { | 379 | if (is_host (optarg)) { |
380 | db_host = optarg; | 380 | db_host = optarg; |
381 | } | 381 | } |
382 | else if (*optarg == '/') { | ||
383 | db_socket = optarg; | ||
384 | } | ||
382 | else { | 385 | else { |
383 | usage2 (_("Invalid hostname/address"), optarg); | 386 | usage2 (_("Invalid hostname/address"), optarg); |
384 | } | 387 | } |