From 84dfba797809d0181fdbf35d78ec7b1caec7c040 Mon Sep 17 00:00:00 2001 From: Gilles Gagniard Date: Tue, 26 May 2015 22:50:28 +0200 Subject: [PATCH 1/2] honor PREFORK setting in /etc/sysconfig/sogo when starting sogod with systemd --- Scripts/sogo-systemd-redhat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/sogo-systemd-redhat b/Scripts/sogo-systemd-redhat index 7fdd56b96..3dacbc40b 100644 --- a/Scripts/sogo-systemd-redhat +++ b/Scripts/sogo-systemd-redhat @@ -3,8 +3,10 @@ Description=SOGo is a groupware server After=network.target [Service] +Environment="PREFORK=3" +EnvironmentFile=-/etc/sysconfig/sogo Type=forking -ExecStart=/usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log +ExecStart=/usr/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log PIDFile=/var/run/sogo/sogo.pid User=sogo From bea9b2690741c34817b1b103bee868f4e6f3eabc Mon Sep 17 00:00:00 2001 From: Gilles Gagniard Date: Tue, 26 May 2015 22:55:14 +0200 Subject: [PATCH 2/2] systemd needs to reload the newly installed sogod.service, otherwise enable/start will fail on first sogo installation --- packaging/rhel/sogo.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/rhel/sogo.spec b/packaging/rhel/sogo.spec index 988f7c693..0b73d702b 100644 --- a/packaging/rhel/sogo.spec +++ b/packaging/rhel/sogo.spec @@ -390,6 +390,7 @@ fi # update timestamp on imgs,css,js to let apache know the files changed find %{_libdir}/GNUstep/SOGo/WebServerResources -exec touch {} \; %if 0%{?_with_systemd} + systemctl daemon-reload systemctl enable sogod systemctl start sogod > /dev/null 2>&1 %else