mirror of
https://git.freebsd.org/ports.git
synced 2025-07-09 05:19:16 -04:00
PR: ports/90669 Submitted by: Serge Gagnon <serge.gagnon@b2b2c.ca> Approved by: maintainer timeout (14 days)
57 lines
1.3 KiB
Bash
57 lines
1.3 KiB
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
#
|
|
# Frank Reppin <frank.reppin@boerde.de>
|
|
|
|
OGO_USER='ogo'
|
|
OGO_GROUP='skyrix'
|
|
ZIDE_BIN='/compat/linux/opt/opengroupware.org/WOApps/ZideStore.woa/ix86/linux-gnu/gnu-fd-nil/ZideStore'
|
|
OGO_DIR='/compat/linux/opt/opengroupware.org'
|
|
LOG='/var/log/opengroupware/zidestore.log'
|
|
|
|
|
|
case $1 in
|
|
start)
|
|
[ ! -f ${LOG} ] && {
|
|
echo 'No ZideStore 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 ${ZIDE_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/ZideStore.woa/ix86/linux-gnu/gnu-fd-nil/ZideStore -WOHttpAllowHost '(localhost, you.yourdomain.org)'>>${LOG} 2>&1 &"
|
|
echo 'ZideStore started.'
|
|
echo "**** RECEIVED 'start' from STARTSCRIPT at `date` ****" >>${LOG}
|
|
}
|
|
;;
|
|
|
|
stop)
|
|
killall -9 ZideStore >/dev/null 2>&1
|
|
killall -9 ZideStore >/dev/null 2>&1
|
|
echo 'ZideStore 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/ZideStore'
|
|
;;
|
|
|
|
*)
|
|
echo "usage: `basename $0` {start|stop|restart|status|}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|