Improved wrapper to locate sogod daemon
Monotone-Parent: 27cac8d3ea745562fe4d70180aa89b4443b19a33 Monotone-Revision: dd1386dca388b9d843e0a5d78f56bbad9428be47 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-05-19T22:49:50 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
5dde4705b0
commit
b8624f1101
|
@ -5,6 +5,7 @@
|
|||
# Copyright (C) 2007-2009 Inverse inc.
|
||||
#
|
||||
# Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
# Francis Lachapelle <flachapelle@inverse.ca>
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -32,33 +33,29 @@ else
|
|||
PIDFILE=/var/run/sogo/sogod.$1
|
||||
fi
|
||||
|
||||
if [ -d /usr/lib/GNUstep ]
|
||||
then
|
||||
. /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh
|
||||
if [ -f /etc/GNUstep/GNUstep.conf ]; then
|
||||
. /etc/GNUstep/GNUstep.conf
|
||||
else
|
||||
if [ -f /usr/share/GNUstep/Makefiles/GNUstep.sh ]
|
||||
then
|
||||
. /usr/share/GNUstep/Makefiles/GNUstep.sh
|
||||
else
|
||||
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
|
||||
fi
|
||||
echo "Can't find GNUstep.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x $GNUSTEP_USER_ROOT/Tools/sogod ]; then
|
||||
sogod="$GNUSTEP_USER_ROOT/Tools/sogod"
|
||||
elif [ -x $GNUSTEP_LOCAL_ROOT/Tools/sogod ]; then
|
||||
sogod="$GNUSTEP_LOCAL_ROOT/Tools/sogod"
|
||||
elif [ -x $GNUSTEP_LOCAL_ROOT/Tools/Admin/sogod ]; then
|
||||
sogod="$GNUSTEP_LOCAL_ROOT/Tools/Admin/sogod"
|
||||
elif [ -x $GNUSTEP_SYSTEM_ROOT/Tools/sogod ]; then
|
||||
sogod="$GNUSTEP_SYSTEM_ROOT/Tools/sogod"
|
||||
elif [ -x $GNUSTEP_SYSTEM_ROOT/Tools/Admin/sogod ]; then
|
||||
sogod="$GNUSTEP_SYSTEM_ROOT/Tools/Admin/sogod"
|
||||
if [ -x $GNUSTEP_SYSTEM_ADMIN_TOOLS/sogod ]; then
|
||||
sogod="$GNUSTEP_SYSTEM_ADMIN_TOOLS/sogod"
|
||||
elif [ -x $GNUSTEP_LOCAL_ADMIN_TOOLS/sogod ]; then
|
||||
sogod="$GNUSTEP_LOCAL_ADMIN_TOOLS/sogod"
|
||||
else
|
||||
echo "Can't find sogod"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $GNUSTEP_MAKEFILES/GNUstep.sh ]; then
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
else
|
||||
echo "Can't find GNUstep.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
woport=`defaults read sogod WOPort`
|
||||
if [ "$?" == "0" ]
|
||||
then
|
||||
|
@ -75,7 +72,7 @@ else
|
|||
fi
|
||||
listen=`echo $woport | awk '{ print $3 }' | sed -e 's/\([0-9]\+\)$/'$port'/g'`
|
||||
|
||||
# echo "SOGOD: $sogod" 2>&1
|
||||
# echo "SOGOD: $sogod -WOPort $listen" 2>&1
|
||||
|
||||
exec $sogod -WOPort $listen >> /var/log/sogo/sogod-$port.log 2>&1 &
|
||||
echo $! > $PIDFILE
|
||||
|
|
Loading…
Reference in New Issue