systemd service script for libreoffice/openoffice

Alessandro Dentella asked:

I’m trying to setup correctly a headless libreoffice/openoffice server on a debian jessie. I created a script named /etc/systemd/system/openoffice.service with the following content

Description=OpenOffice service

ExecStart=/usr/bin/soffice '--accept=socket,host=localhost,port=8101;urp;StarOffice.ServiceManager' --headless --nofirststartwizard --nologo


And I enabled it via:

systemctl enable openoffice.service

I’m in a situation that is only partially working:

  • it correctly starts on boot

  • if queried status systemctl status openoffice.service it clams it is still activating

  • If I try to start it it just hangs

I haven’t been able to find a working example, I’d also like to understand how to create the debian /etc/init.d script that uses systems…

My answer:

You set Type=notify in your service. This is meant to be used only for specific services which are designed to notify systemd when they have finished starting up. At the moment, these are rather uncommon, and I don’t think LibreOffice is among them.

You should most likely be using Type=simple instead.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.