Kevin,
Many thanks for your response. I gave Launchd a look over and did some
digging into /Library/StartupItems as well. Decided to copy one that
already existed in there and see if I could get it to work for
Cherokee. It does. Requires a folder and two files; I named the folder
Cherokee (how appropriate), named one file cherokee and the other
StartupParameters.plist
Here is the contents of cherokee:
#! /bin/bash
. /etc/rc.common
#
# Start Cherokee Web Server
#
# Because this is a start up script, and will be run by root, we use a
specific
# user (the user who installed) to run Cherokee
#
CHEROKEE_DIR="/usr/sbin"
RUNTIME_USER="jw"
if [ ${1:-noset} = "stop" ]; then
su $RUNTIME_USER -b "$CHEROKEE_DIR/cherokee stop"
exit 0
fi
su $RUNTIME_USER -b "$CHEROKEE_DIR/cherokee start"
Here is the contents of StartupParameters.plist
{
Description = "Cherokee Web Server";
Provides = ("Cherokee");
Requires = ();
OrderPreference = "None";
Messages =
{
start = "Starting Cherokee Web Server";
stop = "Stopping Cherokee Web Server";
};
}
Again, I just copied this from another startup script (replacing names
where appropriate). Someone smarter then I could probably write a more
comprehensive script.
On May 13, 6:38 pm, kevin beckford <[email protected]> wrote:
> On Thu, May 13, 2010 at 3:23 PM, ChopperPhil <[email protected]>
> wrote:
> > Okay, Cherokee is super cool. Running it on my MacBook Pro now, but
> > taking it to production on my Apple XServ server - just as soon as I
> > can figure out how to autostart it on boot up.
>
> Unfortunately I think you need launchd. Maybe it's better documented
> on the server OS.
>
> http://developer.apple.com/MacOsX/launchd.html
>
> After all, who does not love XML config files eh?
>
> example for your system apache ( not the macports one )
> /System/Library/LaunchDaemons/org.apache.httpd.plisthttp://gist.github.com/400628 is
> what it looks like
>
> Launchd is a great idea, but so was bringing african honeybees to North
> America.
> _______________________________________________
> Cherokee mailing list
> [email protected]http://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee