diff --git a/Scripts/sogo-init.d-debian b/Scripts/sogo-init.d-debian new file mode 100755 index 000000000..2044a40ab --- /dev/null +++ b/Scripts/sogo-init.d-debian @@ -0,0 +1,53 @@ +#! /bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/sogod-0.9 +NAME=sogo +DESC="Scalable OpenGroupware.Org" + +PIDFILE=/var/run/sogo/sogod.pid + +SOGO_ARGS="" + +if [ -f /etc/default/sogo ]; then + . /etc/default/sogo +fi + +test -x $DAEMON || exit 0 + +#set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -c sogo --pidfile $PIDFILE \ + -b --start --quiet --exec $DAEMON + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + sogopid=$(cat $PIDFILE) + kill ${sogopid} 2> /dev/null + rm -f $PIDFILE + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + sogopid=$(cat $PIDFILE) + kill ${sogopid} 2> /dev/null + rm -f $PIDFILE + sleep 1 + start-stop-daemon -c sogo --pidfile $PIDFILE \ + -b --start --quiet --exec $DAEMON + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/Scripts/sogo-init.d-redhat b/Scripts/sogo-init.d-redhat new file mode 100755 index 000000000..3c04063d9 --- /dev/null +++ b/Scripts/sogo-init.d-redhat @@ -0,0 +1,51 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/sogod +NAME=sogo +DESC="Scalable OpenGroupware.Org" + +PIDFILE=/var/run/sogo/sogod.pid + +SOGO_ARGS="" + +if [ -f /etc/sysconfig/sogo ]; then + . /etc/sysconfig/sogo +fi + +. /etc/init.d/functions + +test -x $DAEMON || exit 0 + +#set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + daemon $DAEMON + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + killall sogod-0.9 2> /dev/null + rm -f $PIDFILE + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + killall sogod-0.9 2> /dev/null + rm -f $PIDFILE + sleep 1 + daemon $DAEMON + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/Scripts/sogod-0.9 b/Scripts/sogod-0.9 index c19d35a7e..99584cece 100755 --- a/Scripts/sogod-0.9 +++ b/Scripts/sogod-0.9 @@ -2,7 +2,7 @@ PIDFILE=/var/run/sogo/sogod.pid -. /usr/local/lib/GNUstep-SOPE/Library/Makefiles/GNUstep.sh +. /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh echo $$ > $PIDFILE exec $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 >& /var/log/sogo/sogod.log diff --git a/Scripts/sogod-redhat b/Scripts/sogod-redhat new file mode 100755 index 000000000..99584cece --- /dev/null +++ b/Scripts/sogod-redhat @@ -0,0 +1,9 @@ +#!/bin/sh + +PIDFILE=/var/run/sogo/sogod.pid + +. /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh + +echo $$ > $PIDFILE +exec $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 >& /var/log/sogo/sogod.log +