From 8ab097afb743061c6c9b865bdb401ba51285c347 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 4 Feb 2013 21:46:20 +0100 Subject: Implement support for systemd(8) "socket activation" This patch enables ngIRCd to work with listening sockets already initialized and passed-in by systemd(8) and hereby to support on-demand "socket activation". systemd(8) uses two environment variables to pass information about the sockets to ngIRCd, LISTEN_PID and LISTEN_FDS, and this mechanism only kicks in when both variables are set. In all other cases, and therefore in most installations out there, nothing changes at all. Please note: If socket activation is in effect, ngIRCd will not initialize any (other) soeckets on its own! All sockets must be configured in the systemd(8) socket unit configuration file in this case, see ./contrib/ngircd.socket for example. Probably it would be interesting to match passed-in sockets to configured listening sockets and to initialize all the remaining ones not already set up by systemd(8), but this is kept back for an other patch ... See - - - --- contrib/ngircd.socket | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/ngircd.socket (limited to 'contrib/ngircd.socket') diff --git a/contrib/ngircd.socket b/contrib/ngircd.socket new file mode 100644 index 00000000..3838efcc --- /dev/null +++ b/contrib/ngircd.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Next Generation IRC Daemon (Socket) + +[Socket] +ListenStream=6667 +#ListenStream=6668 +IPTOS=low-delay + +[Install] +WantedBy=sockets.target -- cgit 1.4.1 From 2cb7023e2835e9c29bec5a6d3a911894c847005d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 10 Feb 2013 20:37:55 +0100 Subject: ngircd.sock: explicitely bind to IPv4 and IPv6 addresses --- contrib/ngircd.socket | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib/ngircd.socket') diff --git a/contrib/ngircd.socket b/contrib/ngircd.socket index 3838efcc..1c0cc004 100644 --- a/contrib/ngircd.socket +++ b/contrib/ngircd.socket @@ -2,8 +2,9 @@ Description=Next Generation IRC Daemon (Socket) [Socket] -ListenStream=6667 -#ListenStream=6668 +BindIPv6Only=ipv6-only +ListenStream=0.0.0.0:6667 +#ListenStream=[::]:6667 IPTOS=low-delay [Install] -- cgit 1.4.1