Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: mod/assign/feedback/editpdf/testunoconv/launchd.

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

From MoodleDocs
(Created page with "This launchd script will start a unoconv listener at boot time and restart it if it crashes. The HOME directory for the unoconv process will be set to "/tmp/" and the user wil...")
 
No edit summary
Line 33: Line 33:
</plist>
</plist>
</pre>
</pre>
[[de:Launchd Skript für Debian]]

Revision as of 10:51, 14 June 2017

This launchd script will start a unoconv listener at boot time and restart it if it crashes. The HOME directory for the unoconv process will be set to "/tmp/" and the user will be "_www" (default apache user on OS X).

Copy this script to /Library/LaunchDaemons/unoconv.plist to install it, then run:

$ sudo launchctl load /Library/LaunchDaemons/unoconv.plist

to start it.

Here is the script.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>Unoconv</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/local/bin/unoconv</string>
            <string>--listener</string>
        </array>
        <key>EnvironmentVariables</key>
        <dict>
            <key>HOME</key>
            <string>/tmp/</string>
        </dict>
        <key>KeepAlive</key>
        <true/>
        <key>UserName</key>
        <string>_www</string>
    </dict>
</plist>