From 9d102fcf3fdc1f98999308de47fc6b71e83caf9c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 11 Oct 2023 08:18:28 +0000 Subject: emergency: support hostname of `.' I think I was too lazy when configuring my Dragonfly VM install. --- lib/PublicInbox/Emergency.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Emergency.pm') diff --git a/lib/PublicInbox/Emergency.pm b/lib/PublicInbox/Emergency.pm index 74a4069a..968d7d6f 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) { -- cgit v1.2.3-24-ge0c7