From 6b0b1a046a07224b4061929357abd6785390c686 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 7 Apr 2011 11:13:49 +0200 Subject: [PATCH] check_pgsql: Allow UNIX socket directories as hostname as well. PostgreSQL accepts the directory name of its UNIX socket as hostname as well, e.g. /var/run/postgresql/. --- plugins/check_pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index b2e1876..6251e0b 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -321,7 +321,7 @@ process_arguments (int argc, char **argv) query_warning = optarg; break; case 'H': /* host */ - if (!is_host (optarg)) + if ((*optarg != '/') && (!is_host (optarg))) usage2 (_("Invalid hostname/address"), optarg); else pghost = optarg; -- 2.30.2