#!/bin/bash # start-xmlrpcd: # Starts and controls instances of the OpenGroupware.org XMLRPC daemon. # Date: 13.06.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/Tools TERMINATE= while [ ! $TERMINATE ]; do ./xmlrpcd $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 XMLRPC daemon has exitet abnormally with status $STATUS." >> "$LOGFILE" else echo "[Control script] OpenGroupware.org XMLRPC daemon has exitet normally." >> "$LOGFILE" fi if respawn_too_fast; then echo "[Control script] OpenGroupware.org XMLRPC daemon respawning too fast. Exiting..." >> "$LOGFILE" TERMINATE=1 fi done echo "" > $PIDFILE exit 0