From 93a7b219d58aad86438cbf3cbf4318a889831ac1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 May 2022 10:52:15 +0000 Subject: public-inbox-netd: a multi-protocol superserver Since we'll be adding POP3 support as our 4th network protocol; asking admins to run yet another daemon on top of existing -httpd, -nntpd, -imapd is a maintenance burden and a waste of memory. The goal of public-inbox-netd is to be able to replace all existing read-only daemons with a single process to save memory and reduce administrative overhead; hopefully encouraging more users to self-host their own mirrors. It's barely-tested at the moment. Eventually, multiple PI_CONFIG and HOME directories will be supported, as are per-listener .psgi config files. --- script/public-inbox-nntpd | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'script/public-inbox-nntpd') diff --git a/script/public-inbox-nntpd b/script/public-inbox-nntpd index 9fb0a8d9..aca27383 100755 --- a/script/public-inbox-nntpd +++ b/script/public-inbox-nntpd @@ -1,15 +1,8 @@ -#!/usr/bin/perl -w -# Copyright (C) 2015-2021 all contributors +#!perl -w +# Copyright (C) all contributors # License: AGPL-3.0+ # # Standalone NNTP server for public-inbox. -use strict; -use warnings; +use v5.12; use PublicInbox::Daemon; -use PublicInbox::NNTPdeflate; # loads PublicInbox::NNTP -use PublicInbox::NNTPD; -my $nntpd = PublicInbox::NNTPD->new; -PublicInbox::Daemon::run('0.0.0.0:119', - sub { $nntpd->refresh_groups }, # refresh - sub ($$$) { PublicInbox::NNTP->new($_[0], $nntpd) }, # post_accept - $nntpd); +PublicInbox::Daemon::run('nntp://0.0.0.0:119'); -- cgit v1.2.3-24-ge0c7