Handle hostnames with upper-case letters
[webmin.git] / status / postgresql-monitor.pl
1 # postgresql-monitor.pl
2 # Monitor the PostgreSQL server on this host
3
4 # Check if postgresql is running
5 sub get_postgresql_status
6 {
7 return { 'up' => -1 } if (!&foreign_check($_[1]));
8 &foreign_require($_[1], "postgresql-lib.pl");
9 local %pconfig = &foreign_config($_[1]);
10 return { 'up' => -1 } if (!-x $pconfig{'psql'});
11 local $r = &foreign_call($_[1], "is_postgresql_running");
12 return { 'up' => $r ? 1 : 0 };
13 }
14
15 sub parse_postgresql_dialog
16 {
17 &depends_check($_[0], "postgresql");
18 }
19