#!/bin/bash # start-webui: # Starts and controls instances of the OpenGroupware.org application 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/OpenGroupware.woa TERMINATE= while [ ! $TERMINATE ]; do ./OpenGroupware $ARGS > /dev/null 2>> "$LOGFILE" & trap "TERMINATE=1; kill $!" 1 2 15 start_time wait $! STATUS=$? if [ "$STATUS" != "0" ]; then echo "[Control script] OpenGroupware.org application server has exitet abnormally with status $STATUS." >> "$LOGFILE" else echo "[Control script] OpenGroupware.org application server has exitet normally." >> "$LOGFILE" fi if respawn_too_fast; then echo "[Control script] OpenGroupware.org application server respawning too fast. Exiting..." >> "$LOGFILE" TERMINATE=1 fi done echo "" > $PIDFILE exit 0