...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#! /bin/sh # nuxeo-launchd.sh # # Wrapper script that starts Nuxeo. This is needed for proper interaction with launchd. #--------------------------------------------------------- # Helper functions #--------------------------------------------------------- # NOTE: We are inheriting NUXEO_HOME from launchd, because its value # was defined in the launchd plist configuration file. export NUXEO_BIN=$NUXEO_HOME/bin export NUXEO_CONF=${NUXEO_BIN}/nuxeo.conf export NUXEO_HOST=127.0.0.1 function shutdown() { # Bye Nuxeo! echo "Shutting down Nuxeo... " $NUXEO_BIN/nuxeoctl stop echo "done." } function startup() { # Let's go! echo "Starting up Nuxeo... " $NUXEO_BIN/nuxeoctl start # Register the shutdown function as callback to execute when a signal # is sent to this process. trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP echo "done." } #--------------------------------------------------------- # Let's go #--------------------------------------------------------- startup while true; do sleep 86400 & wait $! done |
...
And add the content in the file:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.pi.nuxeo</string> <key>ServiceDescription</key> <string>Nuxeo Server</string> <key>UserName</key> <string>pterobyte</string> <key>GroupName</key> <string>staff</string> <key>EnvironmentVariables</key> <dict> <key>NUXEO_HOME</key> <string>/Users/pterobyte/nuxeo-cap-5.9.3-tomcat</string> </dict> <key>ProgramArguments</key> <array> <string>/Users/pterobyte/bin/nuxeo-launchd.sh</string> </array> <key>StandardOutPath</key> <string>/Users/pterobyte/logs/nuxeo-launchd-stdout.log</string> <key>StandardErrorPath</key> <string>/Users/pterobyte/logs/nuxeo-launchd-stderr.log</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist> |
...