about summary refs log tree commit homepage
path: root/lib/PublicInbox/Daemon.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-01 21:24:44 +0000
committerEric Wong <e@80x24.org>2022-08-02 19:20:12 +0000
commit3e6f8bf5a205fa1e0ad9d52cd13fa91f20f79018 (patch)
tree6a8242221508c9690609818316df83e7d6f12579 /lib/PublicInbox/Daemon.pm
parentc38111d6f3877cf31d28b0a0339d063df0fa58f6 (diff)
downloadpublic-inbox-3e6f8bf5a205fa1e0ad9d52cd13fa91f20f79018.tar.gz
This is preparation for supporting loading new certs on SIGHUP.
Diffstat (limited to 'lib/PublicInbox/Daemon.pm')
-rw-r--r--lib/PublicInbox/Daemon.pm3
1 files changed, 3 insertions, 0 deletions
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: $!";
         }