Commit 42c7cd5b authored by sikeda's avatar sikeda
Browse files

[feature] [experimental] configure can take an option "--with-unitsdir=DIR" to...

[feature] [experimental] configure can take an option "--with-unitsdir=DIR" to install Systemd unit files.  It would be used with "--without-initdir" not to install System V init scripts.

If specified, five unit files will be installed.  A few more unit files to suppor nginx environment are provided but they are not installed automatically.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12756 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 20887fb6
......@@ -48,6 +48,7 @@ AC_ARG_ENABLE(
if test "$fhs" = "yes"; then
# only define custom variables
initdir=$sysconfdir/rc.d/init.d
unitsdir=
smrshdir=$sysconfdir/smrsh
piddir=$localstatedir/run/sympa
lockdir=$localstatedir/lock/subsys
......@@ -79,6 +80,7 @@ else
# define custom variables
initdir=/etc/rc.d/init.d
unitsdir=
smrshdir=/etc/smrsh
piddir=$prefix
lockdir=$localstatedir/lock/subsys
......@@ -96,6 +98,7 @@ fi
# substitute custom variables
AC_SUBST(initdir)
AC_SUBST(unitsdir)
AC_SUBST(smrshdir)
AC_SUBST(piddir)
AC_SUBST(lockdir)
......@@ -250,6 +253,15 @@ AS_HELP_STRING(
[test "x$withval" = "xyes" || initdir="$withval"; test "x$withval" = "xno" && initdir=""]
)
AC_ARG_WITH(
unitsdir,
AS_HELP_STRING(
[--with-unitsdir=DIR],
[install Systemd unit files @<:@no@:>@]
),
[test "x$withval" = "xyes" || unitsdir="$withval"; test "x$withval" = "xno" && unitsdir=""]
)
AC_ARG_WITH(
smrshdir,
AS_HELP_STRING(
......
......@@ -21,12 +21,31 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
init_SCRIPTS = sympa
units_SCRIPTS = \
sympa-archive.service \
sympa-bounce.service \
sympa-outgoing.service \
sympa-task.service \
sympa.service
noinst_SCRIPTS = \
nginx-sympasoap.service \
nginx-wwsympa.service \
sympa-tmpfiles.conf
EXTRA_DIST = sympa.in
EXTRA_DIST = \
sympa.in \
sympa-archive.servicein \
sympa-bounce.servicein \
sympa-outgoing.servicein \
sympa-task.servicein \
sympa.servicein \
nginx-sympasoap.servicein \
nginx-wwsympa.servicein \
sympa-tmpfiles.confin
CLEANFILES = $(init_SCRIPTS)
CLEANFILES = $(init_SCRIPTS) $(units_SCRIPTS) $(noinst_SCRIPTS)
sympa: Makefile
sympa: sympa.in Makefile
@rm -f $@
$(AM_V_GEN)$(SED) \
-e 's|--CONFIG--|$(CONFIG)|' \
......@@ -38,4 +57,21 @@ sympa: Makefile
< $(srcdir)/$@.in > $@
@chmod +x $@
sympa: sympa.in
.servicein.service: Makefile
@rm -f $@
$(AM_V_GEN)$(SED) \
-e 's|--USER--|$(USER)|' \
-e 's|--GROUP--|$(GROUP)|' \
-e 's|--libexecdir--|$(libexecdir)|' \
-e 's|--piddir--|$(piddir)|' \
-e 's|--sbindir--|$(sbindir)|' \
< $(srcdir)/$@in > $@
.confin.conf: Makefile
@rm -f $@
$(AM_V_GEN)$(SED) \
-e 's|--USER--|$(USER)|' \
-e 's|--GROUP--|$(GROUP)|' \
-e 's|--piddir--|$(piddir)|' \
< $(srcdir)/$@in > $@
[Unit]
Description=SympaSOAP - SOAP interface for Sympa mailing list manager
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/sympasoap.pid
ExecStart=${FCGI_SPAWN} -F ${FCGI_CHILDREN} \
-P --piddir--/sympasoap.pid \
-u ${FCGI_USER} -g ${FCGI_GROUP} ${FCGI_OPTS} -- \
--libexecdir--/sympa_soap_server.fcgi
Environment="FCGI_SPAWN=/usr/bin/spawn-fcgi"
Environment="FCGI_CHILDREN=5"
Environment="FCGI_USER=--USER--"
Environment="FCGI_GROUP=--GROUP--"
Environment="FCGI_OPTS=-s --piddir--/sympasoap.socket -M 0600 -U nginx"
EnvironmentFile=-/etc/sysconfig/sympa
[Install]
WantedBy=multi-user.target
[Unit]
Description=WWSympa - Web interface for Sympa mailing list manager
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/wwsympa.pid
ExecStart=${FCGI_SPAWN} -F ${FCGI_CHILDREN} \
-P --piddir--/wwsympa.pid \
-u ${FCGI_USER} -g ${FCGI_GROUP} ${FCGI_OPTS} -- \
--libexecdir--/wwsympa.fcgi
Environment="FCGI_SPAWN=/usr/bin/spawn-fcgi"
Environment="FCGI_CHILDREN=5"
Environment="FCGI_USER=--USER--"
Environment="FCGI_GROUP=--GROUP--"
Environment="FCGI_OPTS=-s --piddir--/wwsympa.socket -M 0600 -U nginx"
EnvironmentFile=-/etc/sysconfig/sympa
[Install]
WantedBy=multi-user.target
[Unit]
Description=Sympa mailing list manager (archiving)
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/archived.pid
ExecStart=--sbindir--/archived.pl
[Unit]
Description=Sympa mailing list managemer (bounce processing)
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/bounced.pid
ExecStart=--sbindir--/bounced.pl
[Unit]
Description=Sympa mailing list manager (message distribution)
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/bulk.pid
ExecStart=--sbindir--/bulk.pl
[Unit]
Description=Sympa mailing list manager (task management)
After=syslog.target
BindTo=sympa.service
[Service]
Type=forking
PIDFile=--piddir--/task_manager.pid
ExecStart=--sbindir--/task_manager.pl
d --piddir-- 755 --USER-- --GROUP--
[Unit]
Description=Sympa mailing list manager
After=syslog.target
Wants=sympa-outgoing.service
Wants=sympa-archive.service
Wants=sympa-bounce.service
Wants=sympa-task.service
[Service]
Type=forking
PIDFile=--piddir--/sympa_msg.pid
ExecStartPre=--sbindir--/sympa.pl --health_check
ExecStart=--sbindir--/sympa_msg.pl
[Install]
WantedBy=multi-user.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