Skip to content

Commit 6ed19dd

Browse files
committed
Fix PostgreSQL configuration phase
1 parent 475016e commit 6ed19dd

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/Virtualmin/Config/Plugin/PostgreSQL.pm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sub actions {
3030
if (foreign_check("postgresql")) {
3131
eval {
3232
my $err; # We should handle errors better here.
33-
foreign_require("postgresql", "postgresql-lib.pl");
33+
foreign_require("postgresql");
3434
if (!-r $postgresql::config{'hba_conf'}) {
3535

3636
# Needs to be initialized
@@ -40,17 +40,16 @@ sub actions {
4040
$err = postgresql::start_postgresql();
4141
}
4242

43-
#if ($err) { # Log an error } # Something went wrong
44-
$self->done(0);
43+
$self->done(1); # success
4544
};
4645
if ($@) {
4746
$log->error("Error configuring PostgreSQL: $@");
48-
$self->done(1);
47+
$self->done(0); # failure
4948
}
5049
} else {
5150
$log->info("PostgreSQL Webmin module has not been installed yet, ".
5251
"skipping configuration.");
53-
$self->done(2);
52+
$self->done(2); # warning, skipped
5453
}
5554
}
5655

0 commit comments

Comments
 (0)