Commit 8740fdf5 authored by Clément OUDOT's avatar Clément OUDOT

Fix FastCGI server systemd script / RPM in trunk (#1093)

parent 4eb987e9
......@@ -503,7 +503,7 @@ install_fastcgi_server:
@chmod +x $(RSBINDIR)/llng-fastcgi-server
@cp -f fastcgi-server/rc/llng-fastcgi-server $(RINITDIR)
@cp -f fastcgi-server/default/llng-fastcgi-server $(RETCDEFAULTDIR)
@$(PERL) -pi -e 's#__SBINDIR__#$(SBINDIR)#;s#__DEFAULTDIR__#$(ETCDEFAULTDIR)#;s#__FASTCGISOCKDIR__#$(FASTCGISOCKDIR)#g;s#__USER__#$(FASTCGIUSER)#;s#__GROUP__#$(FASTCGIGROUP)#;' \
@$(PERL) -pi -e 's#__SBINDIR__#$(SBINDIR)#;s#__DEFAULTDIR__#$(ETCDEFAULTDIR)#;s#__FASTCGISOCKDIR__#$(FASTCGISOCKDIR)#g;' \
$(RETCDEFAULTDIR)/llng-fastcgi-server \
$(RSBINDIR)/llng-fastcgi-server \
$(RINITDIR)/llng-fastcgi-server
......
......@@ -6,6 +6,8 @@ After=network.target
Type=forking
EnvironmentFile=/etc/default/llng-fastcgi-server
PIDFile=__FASTCGISOCKDIR__/llng-fastcgi-server.pid
ExecStartPre=-/bin/mkdir __FASTCGISOCKDIR__
ExecStartPre=/bin/chown __USER__:__GROUP__ __FASTCGISOCKDIR__
ExecStart=__SBINDIR__/llng-fastcgi-server
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile ${PID}
KillMode=mixed
......
......@@ -393,6 +393,8 @@ mkdir -p %{buildroot}%{_unitdir}
install -m644 fastcgi-server/systemd/llng-fastcgi-server.service %{buildroot}%{_unitdir}
sed -i 's:__FASTCGISOCKDIR__:/var/run/llng-fastcgi-server:' %{buildroot}%{_unitdir}/llng-fastcgi-server.service
sed -i 's:__SBINDIR__:/usr/share/lemonldap-ng/sbin:' %{buildroot}%{_unitdir}/llng-fastcgi-server.service
sed -i 's:__USER__:%{lm_apacheuser}:' %{buildroot}%{_unitdir}/llng-fastcgi-server.service
sed -i 's:__GROUP__:%{lm_apachegroup}:' %{buildroot}%{_unitdir}/llng-fastcgi-server.service
# Set apache user in some files (see Makefile)
# Note: we do not use the APACHEUSER and APACHEGROUP in make install
......
Markdown is supported
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