]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
emergency: support hostname of `.'
authorEric Wong <e@80x24.org>
Wed, 11 Oct 2023 08:18:28 +0000 (08:18 +0000)
committerEric Wong <e@80x24.org>
Wed, 11 Oct 2023 22:10:52 +0000 (22:10 +0000)
I think I was too lazy when configuring my Dragonfly VM install.

lib/PublicInbox/Emergency.pm

index 74a4069ab178e7e4bfbd0fe942ed0efce20e4b47..968d7d6ff7202958403c5817ee688984fba1414a 100644 (file)
@@ -18,7 +18,7 @@ sub new {
 
 sub _fn_in {
        my ($self, $pid, $dir) = @_;
-       my $host = $self->{short_host} //= (split(/\./, hostname))[0];
+       my $host = $self->{-host} //= (split(/\./, hostname))[0] // 'localhost';
        my $now = time;
        my $n;
        if ($self->{t} != $now) {