#!/bin/bash # start-zidestore: # Starts and controls instances of the ZideStore WebDAV server. # Date: 06.03.2004 # Author: Sebastian Ley # # Modify the following variable to match the location of the gnustep-make # installation: GNUSTEP_MAKE_DIR=/usr/lib/opengroupware.org/System/Makefiles PROGNAME=$0 LOOP=0 TIMEREGISTER=([0]=-100 [1]=-100 [2]=-100 [3]=-100 [4]=-100) usage() { cat < $PIDFILE export LOGNAME=`whoami` . $GNUSTEP_MAKE_DIR/GNUstep.sh cd $GNUSTEP_SYSTEM_ROOT/WOApps/ZideStore.woa TERMINATE= while [ ! $TERMINATE ]; do GNUSTEP_PATHPREFIX_LIST=$GNUSTEP_SYSTEM_ROOT ./ZideStore $ARGS > /dev/null 2>> "$LOGFILE" & trap "TERMINATE=1; kill $!" 1 2 15 start_time wait $! STATUS=$? if [ "$STATUS" != "0" ]; then echo "[Control script] ZideStore WebDAV server has exitet abnormally with status $STATUS." >> "$LOGFILE" else echo "[Control script] ZideStore WebDAV server has exitet normally." >> "$LOGFILE" fi if respawn_too_fast; then echo "[Control script] ZideStore WebDAV server respawning too fast. Exiting..." >> "$LOGFILE" TERMINATE=1 fi done echo "" > $PIDFILE exit 0