5 # Copyright (C) 2007 Inverse groupe conseil
7 # Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
9 # This file is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This file is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; see the file COPYING. If not, write to
21 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 # Boston, MA 02111-1307, USA.
24 PIDFILE=/var/run/sogo/sogod.$1
26 if [ -d /usr/lib/GNUstep ]
28 . /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh
30 . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
33 if [ -f $GNUSTEP_USER_ROOT/Tools/sogod-0.9 ]; then
34 sogod="$GNUSTEP_USER_ROOT/Tools/sogod-0.9"
35 elif [ -f $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 ]; then
36 sogod="$GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9"
38 echo "Can't find sogod-0.9"
44 startport=`defaults read sogod-0.9 WOPort`
47 startport=`echo $startport | awk '{print $3}'`
56 let "port=$startport + $1 - 1"
59 exec $sogod -WOPort $port >> /var/log/sogo/sogod-$port.log 2>&1 &