ports/misc/linux-opengroupware/files/ogo.sh.sample
Pav Lucistnik f1e0440b41 - Fix fetching
- Add two missing symlinks in LINUXBASE/lib
- Load graphics with Apache
- Force administrators to configure software before first startup
- SHA256

PR:		ports/85191
Submitted by:	Serge Gagnon <serge.gagnon@b2b2c.ca>
Approved by:	Frank Reppin <fr@skyrix.com> (maintainer)
2005-11-10 23:32:25 +00:00

57 lines
1.4 KiB
Bash

#!/bin/sh
# $FreeBSD$
#
# Frank Reppin <frank.reppin@boerde.de>
OGO_USER='ogo'
OGO_GROUP='skyrix'
OGO_BIN='/compat/linux/opt/opengroupware.org/WOApps/OpenGroupware.woa/ix86/linux-gnu/gnu-fd-nil/OpenGroupware'
OGO_DIR='/compat/linux/opt/opengroupware.org'
LOG='/var/log/opengroupware/ogo.log'
case $1 in
start)
[ ! -f ${LOG} ] && {
echo 'No OGo logfile present in /var/log/opengroupware - creating one...'
touch ${LOG}
chmod 600 ${LOG}
chown ${OGO_USER}:${OGO_GROUP} ${LOG}
echo 'done!'
}
chmod 600 ${LOG}
chown ${OGO_USER}:${OGO_GROUP} ${LOG}
[ -x ${OGO_BIN} ] && {
su -l ${OGO_USER} -c \
# the next line must be comment out and modified to reflect your configuration in order to start OpenGroupware
# "./WOApps/OpenGroupware.woa/ix86/linux-gnu/gnu-fd-nil/OpenGroupware -WOHttpAllowHost '(localhost, you.yourdomain.org)' >>${LOG} 2>&1 &"
echo 'OpenGroupware started.'
echo "**** RECEIVED 'start' from STARTSCRIPT at `date` ****" >>${LOG}
}
;;
stop)
killall -9 OpenGroupware >/dev/null 2>&1
killall -9 OpenGroupware >/dev/null 2>&1
echo 'OpenGroupware stopped.'
echo "" >>${LOG}
echo "**** RECEIVED 'stop' from STARTSCRIPT at `date` ****" >>${LOG}
;;
restart)
./$0 stop
./$0 start
;;
status)
ps auxwwwww|grep -vi grep|grep -i '/gnu-fd-nil/OpenGroupware'
;;
*)
echo "usage: `basename $0` {start|stop|restart|status|}" >&2
exit 64
;;
esac