mod/assign/feedback/editpdf/testunoconv/launchd

From MoodleDocs
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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>