脚本如图所示,每分钟执行自动启动ESB,现在打印的日志执行了,脚本没执行。但是手动执行restart.sh脚本是可以成功的。ESB版本:8.0.0.2
/etc/profile如下:
.bash_profile如下:
. /opt/ibm/mqsi/8.0.0.2/bin/mqsiprofile如下:
#!/bin/bash
Licensed Materials - Property of IBM
5724-A82
(c) Copyright IBM Corp. 2012.
All Rights Reserved
US Government Users Restricted Rights - use,
duplication or disclosure restricted by GSA
ADP Schedule Contract with IBM Corp.
Level: S800-FP02
Check that this script was sourced and not executed.
if test "basename $0 2>/dev/null
" = "mqsiprofile"
then
echo mqsiprofile must be run in the context of this shell, using the \"source\" or dot \".\" notation, not simply run as a script.
echo Try using \". $0\" or \"source $0\" from the current context.
exit 1
fi
if [ -n "${PROSPECTIVE_MQSI_FILEPATH+MQSI_PROFILE_NOT_SET}" ];
then
echo mqsiprofile repetition disallowed
return 1
fi
PROSPECTIVE_MQSI_FILEPATH=/opt/ibm/mqsi/8.0.0.2
export PROSPECTIVE_MQSI_FILEPATH
MQSI_FILEPATH=${PROSPECTIVE_MQSI_FILEPATH}
export MQSI_FILEPATH
MQSI_WORKPATH=/var/mqsi
export MQSI_WORKPATH
MQSI_VERSION=8.0.0.2
MQSI_VERSION_V=8
MQSI_VERSION_R=0
MQSI_VERSION_M=0
MQSI_VERSION_F=2
MQSI_FAD=6
export MQSI_VERSION MQSI_VERSION_V MQSI_VERSION_R MQSI_VERSION_M MQSI_VERSION_F MQSI_FAD
MQSI_PROCESSOR_ARCHITECTURE=64
export MQSI_PROCESSOR_ARCHITECTURE
If there is a primary MQ install, ensure that its environement is consistent
if [ -r ${MQ_INSTALLATION_PATH:-/usr}/bin/setmqenv ];
then
. ${MQ_INSTALLATION_PATH:-/usr}/bin/setmqenv -s
elif [ -r /usr/bin/setmqenv ];
then
. /usr/bin/setmqenv -s
elif [ -r /opt/mqm/bin/dspmqver ];
then
MQ_JAVA_INSTALL_PATH=/opt/mqm/java
MQ_INSTALLATION_PATH=/opt/mqm
export MQ_JAVA_INSTALL_PATH
export MQ_INSTALLATION_PATH
fi
MQSI_REGISTRY=${MQSI_WORKPATH}
export MQSI_REGISTRY
PATH=${MQSI_FILEPATH}/bin:${MQSI_FILEPATH}/isadc${PATH:+":"${PATH}}
export PATH
MQSI_LILPATH=${MQSI_FILEPATH}/lil:${MQSI_FILEPATH}/jplugin${MQSI_LILPATH:+":"${MQSI_LILPATH}}
export MQSI_LILPATH
MQSI_SECURITY_PROVIDER_PATH=${MQSI_FILEPATH}/SecurityProviders${MQSI_SECURITY_PROVIDER_PATH:+":"${MQSI_SECURITY_PROVIDER_PATH}}
export MQSI_SECURITY_PROVIDER_PATH
MQSI_EXMLTCONFIGPATH=${MQSI_FILEPATH}/exmltConfig
export MQSI_EXMLTCONFIGPATH
LD_LIBRARY_PATH=${MQSI_FILEPATH}/xml4c/lib:${MQSI_FILEPATH}/lib:${MQSI_FILEPATH}/bin:${MQSI_FILEPATH}/ODBC/V6.0/lib:${MQSI_FILEPATH}/xlxpc/lib:${MQSI_FILEPATH}/dfdlc/lib${LD_LIBRARY_PATH:+":"${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH
ICU_DATA=${MQSI_FILEPATH}/xml4c/data${ICU_DATA:+":"${ICU_DATA}}
export ICU_DATA
NLSPATH=${MQSI_FILEPATH}/messages/%L/%N:${MQSI_FILEPATH}/messages/En_US/%N${NLSPATH:+":"${NLSPATH}}
export NLSPATH
MQSI_JARPATH=${MQSI_FILEPATH}/classes:${MQSI_FILEPATH}/messages${MQSI_JARPATH:+":"${MQSI_JARPATH}}
export MQSI_JARPATH
MQSI_CATALINA_HOME=${MQSI_FILEPATH}/catalina
export MQSI_CATALINA_HOME
MQSI_WEBADMIN_HOME=${MQSI_FILEPATH}/webadmin
export MQSI_WEBADMIN_HOME
CLASSPATH=${MQSI_FILEPATH}/messages:${MQSI_FILEPATH}/classes:${MQSI_FILEPATH}/classes/ConfigManagerProxy.jar:${MQSI_FILEPATH}/classes/brokerutil.jar${CLASSPATH:+":"${CLASSPATH}}:${MQSI_WORKPATH}/common/wsrr
export CLASSPATH
IBM_JVM_SR_SIGNUM=64
export IBM_JVM_SR_SIGNUM
MIBDIRS=${MQSI_FILEPATH}/snmp-mib${MIBDIRS:+":"${MIBDIRS}}
export MIBDIRS
for SCRIPT in ${MQSI_WORKPATH}/common/profiles/*.sh; do
if [ -r "${SCRIPT}" ]; then
if [ "${SCRIPT}" != "${MQSI_WORKPATH}/common/profiles/IE02.sh" ]; then
. ${SCRIPT}
fi
fi
done
JRE path overrides in custom profiles are not allowed from 7.0 onwards
MQSI_JREPATH=${MQSI_FILEPATH}/jre16
export MQSI_JREPATH
PATH=${MQSI_JREPATH}/bin${PATH:+":"${PATH}}
export PATH
LD_LIBRARY_PATH=${MQSI_JREPATH}/lib/amd64:${MQSI_JREPATH}/lib/amd64/classic${LD_LIBRARY_PATH:+":"${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH
echo
echo MQSI $MQSI_VERSION
echo $MQSI_FILEPATH
echo
请各位大佬帮忙看看问题出在哪里,急需帮助!!!