Note: You are currently viewing documentation for Moodle 3.9. 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

From MoodleDocs

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>