[Zope] Mac OS X Server StartupItem for Zope
Hugo Ramos
ramosh at gmail.com
Thu Jun 28 19:40:08 EDT 2007
These worked for me:
cat /Library/StartupItems/Zope/Zope
#!/bin/sh
##
# Zope Web Application Server
##
. /etc/rc.common
StartService ()
{
if [ "${ZOPESERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting Zope Application Server"
/www/Zope-2.10.3/inst1/bin/zopectl start
fi
}
StopService ()
{
ConsoleMessage "Stopping Zope Application Server"
/www/Zope-2.10.3/inst1/bin/zopectl stop
}
RestartService ()
{
if [ "${ZOPESERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting Zope Application Server"
/www/Zope-2.10.3/inst1/bin/zopectl restart
fi
}
RunService "$1"
cat /Library/StartupItems/Zope/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>Zope 2.10.3 Final</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>Web Application Server</string>
</array>
<key>Uses</key>
<array>
<string>Disks</string>
<string>NFS</string>
<string>NetworkServices</string>
</array>
</dict>
</plist>
cat /etc/hostconfig
ZOPESERVER=-YES-
C U
Hugo
On 6/28/07, Tom Von Lahndorff <tom at modscape.com> wrote:
>
> I've used Automator to create an app that I have as a startup item
> which restarts Zope on reboot. You could also use iCal for scheduling.
>
> In Automator choose "Automator" under "Library" and then "Run Shell
> Script" and type in your script, save that as an Application then add
> it to your startup items.
>
>
> On Jun 28, 2007, at 5:09 PM, cristopher pierson ewing wrote:
>
> > Hello,
> >
> > I'm trying to get a startup item set up under OS X Server 10.4 on
> > an Intel XServe box. I'd like not to have to manually restart Zope
> > every time a software update forces me to restart the machine.
> > I've gotten the following written up, but it failed to run for some
> > unspecified reason.
> >
> > Here's the plist:
> >
> > {
> > Description = "Zope Application Server";
> > Provides = ("Application Server");
> > Uses = ("Disks", "NFS");
> > }
> >
> > And the startup script:
> >
> > #!/bin/sh
> >
> > ##
> > # Zope Application Server
> > ##
> >
> > . /etc/rc.common
> >
> > ZOPE_APP_BASE=/path/to/zope/instances; export ZOPE_APP_BASE
> >
> > StartService ()
> > {
> > ConsoleMessage "Starting Zope Application Server"
> > ${ZOPE_APP_BASE}/mysite1/zopectl start
> > ${ZOPE_APP_BASE}/mysite2/zopectl start
> > }
> >
> > StopService ()
> > {
> > ConsoleMessage "Stopping Zope Application Server"
> > ${ZOPE_APP_BASE}/mysite1/zopectl stop
> > ${ZOPE_APP_BASE}/mysite2/zopectl stop
> > }
> >
> > RestartService ()
> > {
> > ConsoleMessage "Stopping Zope Application Server"
> > ${ZOPE_APP_BASE}/mysite1/zopectl restart
> > ${ZOPE_APP_BASE}/mysite2/zopectl restart
> > }
> >
> > I have multiple zope instances running, and need to start them all,
> > and this is my attempt, but it doesn't work.
> >
> > Anyone out there have a successful StartupItem script that I could
> > model mine after? Alternatively, anyone have any debugging
> > experience on StartupItems and could point me at how to figure out
> > more than 'it failed' (which is all the system log tells me)?
> >
> > thanks in advance for any advice you all might have!
> >
> > Cris
> >
> > ********************************
> > Cris Ewing
> > CME and Telehealth Web Services
> > Department of Radiology Web Services
> > University of Washington
> > School of Medicine
> > Work Phone: (206) 685-9116
> > Home Phone: (206) 365-3413
> > E-mail: cewing at u.washington.edu
> > *******************************
> >
> >
> > _______________________________________________
> > Zope maillist - Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope-dev )
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
--
Hugo Ramos - ramosh at gmail.com
IT Project Manager
~~~~~~~~~~~~~~ @ ~~~~~~~~~~~~~~
http://www.orkut.com/Profile.aspx?uid=10082105466310142690
http://otuggapoesia.blogspot.com/
http://otugga.blogspot.com/
More information about the Zope
mailing list