#!/bin/bash

RUNLEVEL=3
NEEDS="+network +remote_fs"

# the scripts for zope and zope3 are almost identical

ZOPE=zope3
INSTANCE=/var/$ZOPE
if [ ! -d $INSTANCE ];then
  echo $ZOPE instance $INSTANCE not available. please create one
  echo by running /usr/lib/$ZOPE/bin/mkzopeinstance -d $INSTANCE
  exit 1
fi

PROGRAM=$INSTANCE/bin/zopectl
ARGS="$1"

. /etc/init.d/smgl_init

stop()
{
  echo "Stopping $ZOPE..."
  $PROGRAM stop
  evaluate_retval
}

status()
{
  echo "Status $ZOPE..."
  $PROGRAM status
  evaluate_retval
}

