Article 4Z7VE Script from SysV to SystemD

Script from SysV to SystemD

by
Atikamekw
from LinuxQuestions.org on (#4Z7VE)
Hi everyone,

I have some problem figuring this out so I'm asking for help. I had an init.d script that was sstarting a LibreOffice server and a Xvfd virtual screen and now that Red Hat changed the init.d script to systemd script, I can't make it to work correctly. I can make it work with only the LibreOffice server but whenever I tried to add the Xvfb (mandatory for LibreOfficeserver to run correctly) my script fails.

I use this script :

---------------------------------------------------------------
[Unit]
Description=Headless LibreOffice server script
Documentation=https://fr.libreoffice.org/
DefaultDependencies=no

[Service]
ExecStartPre=/usr/bin/Xvfb :1 -screen 0 1024x768x24 & > /dev/null 2>&1
ExecStart=/usr/lib64/libreoffice/program/soffice --headless --nolockcheck --norestore --nodefault '--accept=socket,host=localhost,port=8101,tcpNoDelay=1;urp;' --nofirststartwizard --nologo
Type=oneshot
TimeoutStopSec=5
PIDFile=/var/run/libreoffice-server.pid

[Install]
WantedBy=multi-user.target
---------------------------------------------------------------

If I comment the Xvfb line (ExecStartPre) and change the type to simple, it's working and launching the LibreOffice server but it can't be reach as it needs an XServer to run correcctly and be reachable from the network for my users to use it in there LibreOffice apps.

Any help would be really appreciated.

Thank you !!

Ricklatest?d=yIl2AUoC8zA latest?i=-mNQylm0jnM:zHGidsla8-Y:F7zBnMy latest?i=-mNQylm0jnM:zHGidsla8-Y:V_sGLiP latest?d=qj6IDK7rITs latest?i=-mNQylm0jnM:zHGidsla8-Y:gIN9vFw-mNQylm0jnM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments