mod/assign/feedback/editpdf/testunoconv/systemd: Difference between revisions

From MoodleDocs
(Created page with "<pre>vim /etc/systemd/system/unoconv.service</pre> If you installed [http://www.tecmint.com/install-libreoffice-on-rhel-centos-fedora-debian-ubuntu-linux-mint/ LibreOffice 5....")
 
m (→‎SystemD script example for unoconv on CentOS/RedHat 7.x: clean up, typos fixed: i.e → i.e.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= SystemD script example for unoconv on CentOS/RedHat 7.x =
[[mod/assign/feedback/editpdf/testunoconv|Back to unoconv installation]]
<pre>vim /etc/systemd/system/unoconv.service</pre>
<pre>vim /etc/systemd/system/unoconv.service</pre>


Line 5: Line 8:
Otherwise, discard the 'Environment' line from the file.
Otherwise, discard the 'Environment' line from the file.


Also, if you installed 'unoconv' from [https://github.com/dagwieers/unoconv sources] (like in the example below), make sure you use the proper path (i.e "/usr/local/bin/unoconv").
Also, if you installed 'unoconv' from [https://github.com/dagwieers/unoconv sources] (like in the example below), make sure you use the proper path (i.e. "/usr/local/bin/unoconv").


<pre>
<pre>
Line 28: Line 31:
#systemctl start unoconv.service
#systemctl start unoconv.service
</pre>
</pre>
[[mod/assign/feedback/editpdf/testunoconv|Back to unoconv installation]]
[[de:SystemD Service Skript für CentOS/RedHat 7.x]]

Latest revision as of 16:10, 11 January 2024

SystemD script example for unoconv on CentOS/RedHat 7.x

Back to unoconv installation

vim /etc/systemd/system/unoconv.service

If you installed LibreOffice 5.2 packages that are not part of the CentOS/RedHat distribution, You better add the Environment="UNO_PATH=/opt/libreoffice5.2/program" to the file (as seen in the example below) as unoconv might need the python libraries that came with the LibreOffice 5.2 packages. Otherwise, discard the 'Environment' line from the file.

Also, if you installed 'unoconv' from sources (like in the example below), make sure you use the proper path (i.e. "/usr/local/bin/unoconv").

[Unit]
Description=Unoconv listener for document conversions
Documentation=https://github.com/dagwieers/unoconv
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
Environment="UNO_PATH=/opt/libreoffice5.2/program"
ExecStart=/usr/local/bin/unoconv --listener

[Install]
WantedBy=multi-user.target

After you saved the above file, make it stick between system boots:

#systemctl enable unoconv.service
#systemctl start unoconv.service

Back to unoconv installation