Starting newLISP server on Mac OS X using launchd

Put the following file in your home directory into

~/Library/LaunchAgents/org.newlisp.newlisp.plist

newLISP server will be loaded automatically when Mac OS X starts and the user is logged in. The file can also be put into /Library/LaunchAgents/ when newLISP server should be run for any user.

<?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>org.newlisp.newlisp</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/newlisp</string>
		<string>-c</string>
		<string>-d4711</string>
		<string>-w/Users/lutz/Sites</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
Change the -d port number and -w working directory to the local requirements. The Mac OS X utility launchctl can be used to check if newLISP is loaded and to manually load or unload it.

To see if newLISP server is loaded:

launchctl list | grep newlisp

To manually unload:

launchctl unload ~/Library/LaunchAgents/org.newlisp.newlisp.plist

To restart without rebooting:

launchctl load ~/Library/LaunchAgents/org.newlisp.newlisp.plist
§