This is preparation for supporting loading new certs on SIGHUP.
---
 lib/PublicInbox/Daemon.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 0392d15f..87a359e7 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -66,6 +66,7 @@ sub accept_tls_opt ($) {
                        my $host = '';
                        $path =~ s/\A([^:]+):// and $host = $1;
                        $x->{$host} = $path;
+                       check_absolute($k, $path) if $daemonize;
                }
        }
        my $ctx = IO::Socket::SSL::SSL_Context->new(%ctx_opt) or
@@ -283,6 +284,8 @@ sub daemonize () {
                check_absolute('--stdout', $stdout);
                check_absolute('--stderr', $stderr);
                check_absolute('--pid-file', $pid_file);
+               check_absolute('--cert', $default_cert);
+               check_absolute('--key', $default_key);
 
                chdir '/' or die "chdir failed: $!";
        }

Reply via email to