Note: This applies to DocuShare 6.0.x and 6.1.x.
Warning: Xerox does NOT offer scripts. This sample script is provided only as a reference as a possible backup procedure. There are no implied or expressed warranties or guarantees with this script. Xerox cannot be held responsible for damage or loss of data due to the use of this script. The customer is 100% responsible for the backup and protection of their own data.
Note: The example script below will need to be modified to suite your installation variables. For further information on creating a scripts/batch files to stop and/or start services contact vendor directly.
The text in this script will need to copied and pasted into a text editor then modified to suit the installation variables at your site.
Sample initds Script
Script
#!/bin/sh
# ds6 This is the init script for starting up the
# Xerox DocuShare
# DSVERSION is:
DSVERSION=6.0
# Source function library.
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get function listing for cross-distribution logic.
#TYPESET=`typeset -f|grep "declare"`
# Get config.
. /etc/sysconfig/network
# Find the name of the script
NAME=`basename $0`
if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]
then
NAME=${NAME:3}
fi
# Set defaults for configuration variables
export DOCUSHARE_HOME=/usr/local/Xerox/DocuShare
DOCUSHARE_USER=nobody
#DOCUSHARE_USER=root
DOCUSHARE_LOG=${DOCUSHARE_HOME}/logs/start.log
# Check that networking is up.
# Pretty much need it for postmaster.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f $DOCUSHARE_HOME/bin/start_docushare.sh ] || exit 0
start(){
DS_START=$"Starting DocuShare ${DSVERSION} "
# Check for DocuShare already running...
su -l ${DOCUSHARE_USER} -c "cd ${DOCUSHARE_HOME}/bin; ${DOCUSHARE_HOME}/bin/monitor.sh shutdown" > /dev/null 2>&1 < /dev/null
ret=$?
if [ $ret -eq 0 ]
then
echo "DocuShare found running during a system script start" >> ${DOCUSHARE_LOG} 2>&1 < /dev/null
else
echo -n "$DS_START"
su -l ${DOCUSHARE_USER} -c "cd ${DOCUSHARE_HOME}/bin; ${DOCUSHARE_HOME}/bin/start_docushare.sh" >> ${DOCUSHARE_LOG} 2>&1 < /dev/null &
sleep 1
fi
}
stop(){
echo -n $"Stopping DocuShare ${DSVERSION} "
su -l ${DOCUSHARE_USER} -c "cd ${DOCUSHARE_HOME}/bin; ${DOCUSHARE_HOME}/bin/monitor.sh -q shutdown" > /dev/null 2>&1 < /dev/null
}
restart(){
stop
start
}
status(){
echo -n $"Status of DocuShare ${DSVERSION} "
su -l ${DOCUSHARE_USER} -c "cd ${DOCUSHARE_HOME}/bin; ${DOCUSHARE_HOME}/bin/monitor.sh status"
}
condrestart(){
[ -e /var/lock/subsys/${NAME} ] && restart
}
condstop(){
[ -e /var/lock/subsys/${NAME} ] && stop
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
restart
;;
condrestart)
condrestart
;;
condstop)
condstop
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop}"
exit 1
esac
exit 0
Solution Published: March 21st, 2012
Solution ID: 1072