Hi Experts,
Can you Please look into this script? stop scripts being called by the /etc/init.d/simapps script itself, are not stopping all processes I request to add some kill statements into the /etc/init.d/simapps script to ensure that all documentum processes are dead prior to allowing the start portion of the timsapps script from being ran.Please let me know if I can proceed with building more logic into the simsapps script. As a reference, here is what the current simsapps script looks like:
#!/sbin/sh
#
#
# script to stop/start all PCO processes
USER=`whoami`
if [ $USER = 'root' ]; then
SUCMD='/usr/bin/su - pmadmin -c'
elif [ $USER = 'pmadmin' ]; then
SUCMD=''
else
echo "Script must be run as pmadmin or root"
exit 1
fi
case "$1" in
start)
$SUCMD /apps/documentum/dba/dm_la
unch_pcoap
02local
$SUCMD /apps/documentum/dba/dm_la
unch_pcoap
02global
$SUCMD /apps/documentum/dba/dm_st
art_axprep
$SUCMD /apps/documentum/product/5
.3/tomcat/
bin/startu
p.sh
;;
stop)
$SUCMD /apps/documentum/product/5
.3/tomcat/
bin/shutdo
wn.sh
$SUCMD /apps/documentum/dba/dm_sh
utdown_axp
rep
$SUCMD /apps/documentum/dba/dm_st
op_pcoap02
global
$SUCMD /apps/documentum/dba/dm_st
op_pcoap02
local
;;
restart)
$SUCMD /apps/documentum/product/5
.3/tomcat/
bin/shutdo
wn.sh
$SUCMD /apps/documentum/dba/dm_sh
utdown_axp
rep
$SUCMD /apps/documentum/dba/dm_st
op_pcoap01
global
$SUCMD /apps/documentum/dba/dm_st
op_pcoap01
local
sleep 5
$SUCMD /apps/documentum/dba/dm_la
unch_pcoap
01local
$SUCMD /apps/documentum/dba/dm_la
unch_pcoap
01global
$SUCMD /apps/documentum/dba/dm_st
art_axprep
$SUCMD /apps/documentum/product/5
.3/tomcat/
bin/startu
p.sh
;;
status)
tput smso
echo "###Local dmdocbroker running on port 1489, should be owned by pmadmin###"
tput rmso
/usr/bin/ps -ef | grep 'dmdocbroker -port 1489' | grep -v grep
echo ""
tput smso
echo "###Global dmdocbroker running on port 1490 , should be owned by pmadmin###"
tput rmso
/usr/bin/ps -ef | grep 'dmdocbroker -port 1490' | grep -v grep
echo ""
tput smso
echo "###Multiple documentum docbase_name with axprep name, should be owned by pmadmin###"
tput rmso
/usr/bin/ps -ef | grep 'documentum -docbase_name axprep' | grep -v grep
echo ""
tput smso
echo "###Java app for Documentum, java under /apps/documentum path should be owned by pmadmin###"
tput rmso
/usr/bin/ps -ef | grep java | grep -v grep
;;
*)
echo "Usage: $0 (stop|start|restart|status
)"
exit 1
;;
esac
As you can see, this script actually calls the application startup/shutdown scripts as user dmadmin, rather than root. I want to add process checking logic into the 'stop' portion of the script, as well as the 'start' portion to prevent any of the scripts being called prior to a complete shutdown of existing processes.
Please help adding the logic into......OR add some steps to the script.
Thanks In Advance.
Start Free Trial