Re: zwei ogo´s auf einem server
| Newsgroups | gmane.comp.cms.opengroupware.discuss.german |
|---|---|
| Message-ID | <[email protected]> |
Helge Hess wrote:
> - gibt es ein komfortableres start/stop script wie "/etc/init.d/xxx
> start",
in dem archiv http://mail.opengroupware.org/mailman/listinfo/users-de
findet sich bestimmt ein hinweis darauf,
ansonsten siehe unten
> somit wäre die konsole auch weiter nutzbar ?
<hint> & </hint>
teste doch einmal
$ gedit &
$ killall gedit
--------
#!/bin/sh
#
# Startup script for OpenGroupware on UNIX systems.
#
# Based on Henrik Holmboe script
# Changed for RedHat 9 By Yedidia Klein <yedidia at jct dot ac dot il>
#
# NOTE: This script currently needs to have an environment that
# automatically sources ~/OpenGroupware.org.sh. This is achievable with
# this command: (as opengroupware user)
#
# echo "source /opt/opengroupware.org/OpenGroupware.org.sh" >>
~/.bash_profile
#
# NOTE2: Redhat 9 users has also to set LD_ASSUME_KERNEL This is
achievable with
# this command: (as opengroupware user)
# echo "export LD_ASSUME_KERNEL=2.4.1" >> ~/.bash_profile
# chkconfig: 2345 75 25
# description: OpenGroupware is a groupware server
# Configuration section
OGO_DIR=/opt/opengroupware.org
OGO_BIN=$OGO_DIR/WOApps/OpenGroupware.woa/ix86/linux-gnu/gnu-fd-nil/OpenGroupware
## folgendes wegen meiner hosts anpassen
OGO_ARGS="-WOPort 20000 -WOHttpAllowHost xp1800
-OGoMinimumActiveSessionCount 0"
## OGO_ARGS="-WOPort 20000 -WOHttpAllowHost localhost.localdomain
-OGoMinimumActiveSessionCount 0"
PID_FILE=/var/run/ogo.pid
LOG=/var/log/ogo.log
# end configuration section
# Source function library.
# Use the funtions provided by Red Hat or use our own
if [ -f /etc/rc.d/init.d/functions ]
then
. /etc/rc.d/init.d/functions
else
function action {
echo "$1"
shift
$@
}
function success {
echo -n "Success"
}
function failure {
echo -n "Failed"
}
fi
[ -x $OGO_BIN ] || exit 0
case "$1" in
start)
echo -n "Starting OpenGroupware: "
pushd $OGO_DIR > /dev/null
# log separator
echo
"----------------------------------------------------------------------"
>> $LOG
# run as a user 'opengroupware':
if [ "`uname -s`" = "Linux" ]; then
env -i su - opengroupware -c "$OGO_BIN $OGO_ARGS" >> $LOG 2>&1 &
elif [ "`uname -s`" = "FreeBSD" ]; then
env -i su -l opengroupware -c "$OGO_BIN $OGO_ARGS" >> $LOG
2>&1 &
fi
echo $! > $PID_FILE
popd > /dev/null
success "Starting OpenGroupware"
echo
;;
stop)
echo -n "Shutting down OpenGroupware: "
if test -f "$PID_FILE" ; then
PID=`cat $PID_FILE`
if kill $PID >> $LOG 2>&1 ; then
/bin/rm $PID_FILE
success "Shutting down OpenGroupware"
else
echo ""
echo "Could not kill process $PID named in $PID_FILE.
Check tail of $LOG."
failure "Shutting down OpenGroupware"
fi
else
echo ""
echo "No OpenGroupware pid file found. Looked for $PID_FILE."
failure "No OpenGroupware pid file found. Looked for $PID_FILE."
fi
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: opengroupware {start|stop|restart}"
exit 1
esac
exit 0
--------
--
shrek-m