Unverified Commit 992a3133 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1362 from ikedas/systemd_socket by xavierba & ikedas

Add unit/socket files to make use of multiwatch
parents 4270e6cc cb4ea420
......@@ -40,7 +40,10 @@ Makefile
/po/sympa/stamp-po
/po/web_help/remove-potcdate.sed
/po/web_help/stamp-po
/src/etc/script/sympa
/service/sympa
/service/*.service
/service/*.socket
/service/sympa-tmpfiles.conf
/src/lib/stamp-man3
/src/lib/stamp-man1
/src/lib/Sympa/Constants.pm
......
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2017, 2018, 2019 The Sympa Community. See the AUTHORS.md file at
# the top-level directory of this distribution and at
# Copyright 2017, 2018, 2019, 2022 The Sympa Community. See the
# AUTHORS.md file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
# This program is free software; you can redistribute it and/or modify
......@@ -23,7 +21,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
SUBDIRS = src default doc po www
SUBDIRS = src default doc po service www
check_SCRIPTS = \
t/01_Conf.t \
......
# configure.ac - Top-level configure.in for Sympa
# $Id$
#
# Sympa - SYsteme de Multi-Postage Automatique
#
......@@ -7,7 +6,7 @@
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2017, 2018, 2019, 2020, 2021 The Sympa Community. See the
# Copyright 2017, 2018, 2019, 2020, 2021, 2022 The Sympa Community. See the
# AUTHORS.md file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
......@@ -663,11 +662,10 @@ AC_CONFIG_FILES([
po/Makefile
po/sympa/Makefile.in
po/web_help/Makefile.in
service/Makefile
src/Makefile
src/bin/Makefile
src/cgi/Makefile
src/etc/Makefile
src/etc/script/Makefile
src/lib/Makefile
src/libexec/Makefile
src/sbin/Makefile
......
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2018 The Sympa Community. See the AUTHORS.md file at the
# top-level directory of this distribution and at
# Copyright 2022 The Sympa Community. See the
# AUTHORS.md file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
# This program is free software; you can redistribute it and/or modify
......@@ -35,20 +29,29 @@ units_DATA = \
sympa-task.service \
sympa.service
noinst_DATA = \
sympasoap.service \
wwsympa.service \
sympasoap-spawn-fcgi.service \
wwsympa-spawn-fcgi.service \
sympasoap-multiwatch.service \
sympasoap-multiwatch.socket \
wwsympa-multiwatch.service \
wwsympa-multiwatch.socket \
sympa-tmpfiles.conf
endif
EXTRA_DIST = \
README.md \
sympa.in \
sympa-archive.servicein \
sympa-bounce.servicein \
sympa-outgoing.servicein \
sympa-task.servicein \
sympa.servicein \
sympasoap.servicein \
wwsympa.servicein \
sympasoap-spawn-fcgi.servicein \
sympasoap-multiwatch.servicein \
sympasoap-multiwatch.socketin \
wwsympa-spawn-fcgi.servicein \
wwsympa-multiwatch.servicein \
wwsympa-multiwatch.socketin \
sympa-tmpfiles.confin
CLEANFILES = $(init_SCRIPTS) $(units_DATA) $(noinst_DATA)
......@@ -74,6 +77,12 @@ sympa: sympa.in Makefile
-e 's|--sbindir--|$(sbindir)|' \
< $(srcdir)/$@in > $@
.socketin.socket: Makefile
@rm -f $@
$(AM_V_GEN)$(SED) \
-e 's|--piddir--|$(piddir)|' \
< $(srcdir)/$@in > $@
.confin.conf: Makefile
@rm -f $@
$(AM_V_GEN)$(SED) \
......
Files to support service management
===================================
SysVinit
--------
* sympa
Generic init script for the system derived from System V.
Systemd
-------
* sympa-archive.service
* sympa-bounce.service
* sympa-outgoing.service
* sympa-task.service
* sympa.service
Units for Sympa services. Copy these files into Systemd system directory.
* sympa-tmpfiles.conf
Definition of ephemeral directory.
* wwsympa-multiwatch.service
* wwsympa-multiwatch.socket
* sympasoap-multiwatch.service
* sympasoap-multiwatch.socket
Units for WWSympa and SympaSOAP, using multiwatch. Copy these files as
`wwsympa.service`, `wwsympa.socket` and so on into Systemd system
directory.
* wwsympa-spawn-fcgi.service
* sympasoap-spawn-fcgi.service
Units for WWSympa and SympaSOAP, using spawn-fcgi. Copy these files as
`wwsympa.service`, `wwsympa.socket` and so on into Systemd system
directory.
[Unit]
Description=Sympa SOAP interface FastCGI backend
After=sympa.service
Requires=sympasoap.socket
[Service]
User=--USER--
Group=--GROUP--
ExecStart=/usr/bin/multiwatch \
-f $SOAP_FCGI_CHILDREN -- \
--execcgidir--/sympa_soap_server.fcgi
StandardOutput=null
StandardInput=socket
StandardError=journal
Environment="SOAP_FCGI_CHILDREN=2"
EnvironmentFile=-/etc/default/sympa
EnvironmentFile=-/etc/sysconfig/sympa
Restart=always
RestartSec=5
[Install]
Also=sympasoap.socket
WantedBy=multi-user.target
[Unit]
Description=Sympa SOAP interface socket
[Socket]
SocketUser=nobody
SocketMode=0600
ListenStream=--piddir--/sympasoap.socket
[Install]
WantedBy=sockets.target
[Unit]
Description=Sympa web interface FastCGI backend
After=sympa.service
Requires=wwsympa.socket
[Service]
User=--USER--
Group=--GROUP--
ExecStart=/usr/bin/multiwatch \
-f $WWS_FCGI_CHILDREN -- \
--execcgidir--/wwsympa.fcgi
StandardOutput=null
StandardInput=socket
StandardError=journal
Environment="WWS_FCGI_CHILDREN=5"
EnvironmentFile=-/etc/default/sympa
EnvironmentFile=-/etc/sysconfig/sympa
Restart=always
RestartSec=5
[Install]
Also=wwsympa.socket
WantedBy=multi-user.target
[Unit]
Description=Sympa web interface socket
[Socket]
SocketUser=nobody
SocketMode=0600
ListenStream=--piddir--/wwsympa.socket
[Install]
WantedBy=sockets.target
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment