PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fehler im Startscript?? von opengroupware?



Manfred Werner
01.04.05, 06:30
Hallo Forum

ich habe opengroupware auf meinem SuSE Standartserver 8 installiert.
Beim Start mit /etc/init.d/opengroupware erhalte ich folgende Fehlermeldung:

Starting opengroupware: /etc/init.d/opengroupware: line 54: [: 5361: unary operator expected


Wer Weiß einen Rat ??

Manfred

tschloss
01.04.05, 07:03
Vielleicht postest du mal das skript oder den relevanten Auszug?

Grüße
Thomas

Manfred Werner
01.04.05, 07:13
Sorry, war zu schnell

hier ist das Script



#!/bin/sh
# OpenGroupware.org
#
# Author: Frank Reppin <frank@opengroupware.org>, 2004
#
#
# /etc/init.d/opengroupware
#
# and symbolic its link
#
# /usr/sbin/rcopengroupware
#
### BEGIN INIT INFO
# Provides: opengroupware
# Required-Start: $network $remote_fs $postgresql $apache
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Start the OpenGroupware
### END INIT INFO

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
OGO_DIR=/opt/opengroupware.org
OGO_BIN=/opt/opengroupware.org/WOApps/OpenGroupware.woa/ix86/linux-gnu/gnu-fd-nil/OpenGroupware
OGO_ARGS="-WOPort 20000 -WOHttpAllowHost 'localhost, Ihrhost.Ihredomain.tld' -OGoMinimumActiveSessionCount 0"
OGO_USER=ogo
PID_FILE=/var/run/ogo.pid
LOG=/var/log/opengroupware/ogo.log
prog="opengroupware"
start(){
echo -n $"Starting $prog: "
pushd $OGO_DIR > /dev/null

# log separator
echo "----------------------------------------------------------------------" >> $LOG

env -i su - $OGO_USER -s /bin/bash -c "exec $OGO_BIN $OGO_ARGS" >> $LOG 2>&1 &
echo > $PID_FILE
popd > /dev/null
sleep 1
pid=`/sbin/pidof $OGO_BIN`
if [ $pid ]; then
touch /var/lock/subsys/$prog
else
rm -f /var/lock/subsys/$prog
fi
echo
}

stop(){
echo -n $"Shutting down $prog: "
if test -f "$PID_FILE" ; then
PID=`cat $PID_FILE`
if kill $PID >> $LOG 2>&1 ; then
/bin/rm $PID_FILE
rm -f /var/lock/subsys/$prog
else
echo ""
echo "Could not kill process $PID named in $PID_FILE. Check tail of $LOG."
fi
else
killproc $prog
RETVAL=0
echo
if [ $RETVAL -eq 0 ];then
rm -f /var/lock/subsys/$prog
/bin/rm $PID_FILE
fi

return $RETVAL
fi
echo
}

restart(){
stop
start
}

[ -x $OGO_BIN ] || exit 0

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

Tomek
01.04.05, 11:13
Ersetze in der Zeile 54:

if [ $pid ]; then
mit:

if [ "$pid" ]; then