From: Eric Wong Date: Wed, 11 Oct 2023 08:18:28 +0000 (+0000) Subject: emergency: support hostname of `.' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d102fcf3fdc1f98999308de47fc6b71e83caf9c;p=thirdparty%2Fpublic-inbox.git emergency: support hostname of `.' I think I was too lazy when configuring my Dragonfly VM install. --- diff --git a/lib/PublicInbox/Emergency.pm b/lib/PublicInbox/Emergency.pm index 74a4069ab..968d7d6ff 100644 --- a/lib/PublicInbox/Emergency.pm +++ b/lib/PublicInbox/Emergency.pm @@ -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) {