apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

Unable to start CalendarServer from StartupItem in Mac OS X 10.5.6 #260

Closed macosforgebot closed 15 years ago

macosforgebot commented 15 years ago

tonykambo@… originally submitted this as ticket:327


Have defined the following in an attempt to have CalendarServer launch automatically as a StartupItem.

I followed the instructions here for creating Startup Items:

http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html

It fails to start with the following error message in the Console Messages log:

23/03/09 1:40:38 PM com.apple.SystemStarter[30] ./Users/myusername/Developer/iCalServer/run: line 634: USER: unbound variable

Would appreciate if this can be resolved. I have included the startup files below.


/Library/StartupItems/iCalServer/iCalServer


#!/bin/sh
. /etc/rc.common

StartService ()
{
        ./Users/myusername/Developer/iCalServer/run -d
}

StopService ()
{
        ./Users/myusername/Developer/iCalServer/run -k
}

RestartService ()
{
        ./Users/myusername/Developer/iCalServer/run -r
}

RunService "$1"

/Library/StartupItems/iCalServer/StartupParameters.plist


<?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>Description</key>
        <string>iCalServer</string>
        <key>Messages</key>
        <dict>
                <key>start</key>
                <string>Starting iCalServer</string>
                <key>stop</key>
                <string>Stopping iCalServer</string>
        </dict>
        <key>OrderPreference</key>
        <string>Last</string>
        <key>Provides</key>
        <array>
                <string>iCalServer</string>
        </array>
        <key>Requires</key>
        <array>
                <string>Network</string>
        </array>
</dict>
</plist>

/Library/StartupItems/iCalServer/Resources/English.lproj


<?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>Starting iCalServer</key>
        <string>Starting iCalServer</string>
        <key>Stopping iCalServer</key>
        <string>Stopping iCalServer</string>
</dict>
</plist>

macosforgebot commented 15 years ago

tonykambo@… originally submitted this as comment:1:⁠ticket:327

macosforgebot commented 15 years ago

@wsanchez originally submitted this as comment:2:⁠ticket:327


The run script isn't meant to be used in a system install. That's for development.

You should install the server:

run -i /tmp/dst
cd /tmp/dst
pax -pe -rw . /

Then start the server using /usr/sbin/caldavd.