3 # This is Zope ZServer startscript for PLD Linux
6 ZOPE_BASE=/usr/lib/zope
7 CLIENT_HOME=$INSTANCE_HOME/var
11 if [ "x$ZOPE_USER" = "x" ]; then
15 ZOPE_GROUP=`id -ng $ZOPE_USER`
17 if [ ! -d $INSTANCE_HOME ]; then
21 chmod 1701 $INSTANCE_HOME
22 chown root:$ZOPE_GROUP $INSTANCE_HOME
24 if [ ! -d $INSTANCE_HOME/var ]; then
25 mkdir $INSTANCE_HOME/var
28 chown root:$ZOPE_GROUP $INSTANCE_HOME/var
29 chmod 1701 $INSTANCE_HOME/var
31 if [ ! -d /var/log/zope ]; then
33 chmod o-rwx /var/log/zope
34 chown root:root /var/log/zope
39 if [ "$WATCHDOG" = "0" ]; then
45 if [ "x$CGIBIN_BASE" = "x" ]; then
48 p_string="-p $CGIBIN_FILE"
51 if [ "x$DEBUG_MODE" = "xyes" -o "x$DEBUG_MODE" = "x1" ]; then
57 if [ "x$LOG_FILE" = "x" -o "x$LOG_FILE" = "x0" ]; then
58 LOG_FILE=/var/log/zope/$INSTANCE_NAME.log
61 if [ "x$DETAILED_LOG_FILE" = "x" -o "x$DETAILED_LOG_FILE" = "x0" ]; then
64 if [ "x$DETAILED_LOG_FILE" = "xyes" -o "x$DETAILED_LOG_FILE" = "x1" ]; then
65 details="-M /var/log/zope/$INSTANCE_NAME-detailed.log"
67 details="-M $DETAILED_LOG_FILE"
71 if [ "x$LOC" != "x" ]; then
77 if [ "x$ICP_PORT" = "x" -o "x$ICP_PORT" = "x0" ]; then
80 icpstr="--icp $ICP_PORT"
83 if [ "x$IP_ADDRESS" = "x" -o "x$IP_ADDRESS" = "x0" ]; then
86 ipstr="-a '$IP_ADDRESS'"
89 # show what we're going to do
91 if [ "x$debugging" != "x" ]; then
92 cat <<EE | ( while read line; do echo "zope-start: $line"; done ) >>$LOG_FILE
94 Instance name: $INSTANCE_NAME
96 exec python $ZOPE_BASE/z2.py
116 exec python $ZOPE_BASE/z2.py \
117 -z "$INSTANCE_HOME" \
118 -t "$NUMBER_OF_THREADS" \