summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 726728b)
raw | patch | inline | side by side (parent: 726728b)
author | Sebastian Harl <sh@teamix.net> | |
Thu, 7 Apr 2011 09:13:49 +0000 (11:13 +0200) | ||
committer | Sebastian Harl <sh@teamix.net> | |
Thu, 7 Apr 2011 09:13:49 +0000 (11:13 +0200) |
PostgreSQL accepts the directory name of its UNIX socket as hostname as well,
e.g. /var/run/postgresql/.
e.g. /var/run/postgresql/.
plugins/check_pgsql.c | patch | blob | history |
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index b2e1876f1801605a4fafc2d28d415c2c940f932b..6251e0b21ed199f02639e8dedfbc0da69bbf0eec 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
query_warning = optarg;
break;
case 'H': /* host */
- if (!is_host (optarg))
+ if ((*optarg != '/') && (!is_host (optarg)))
usage2 (_("Invalid hostname/address"), optarg);
else
pghost = optarg;