#!/bin/shSCRIPT="0ドル"err_exit() {echo $@exit 1}check_file() {if [ ! -f 1ドル ]; thenerr_exit "cannot find 1ドル"fi}unzip_elasticsearch() {echo "unzip elasticsearch"es_path=$ZS_HOME/thirdparty/elasticsearch*ls $es_path &>/dev/nullif [ $? -ne 0 ]; thenerr_exit "cannot find elasticsearch tarball at $es_path"fies_path=`ls $es_path`tar xzf $es_path -C $RUNTIME_HOME}unzip_tomcat_deploy_war() {echo "unzip tomcat and deploy zstack.war"tomcat_path=$ZS_HOME/thirdparty/apache-tomcat*ls $tomcat_path &>/dev/nullif [ $? -ne 0 ]; thenerr_exit "cannot find tomcat tarball at $es_path"fitomcat_path=`ls $tomcat_path`tar xzf $tomcat_path -C $RUNTIME_HOMEtcathome=`ls -d $RUNTIME_HOME/apache-tomcat*`warfile=$ZS_HOME/lib/zstack.warcheck_file $warfilewardir=$tcathome/webapps/zstackmkdir -p $wardirunzip $warfile -d $wardir &>/dev/null}start_elasticsearch() {ps -aux | grep java | grep elasticsearch &>/dev/nullif [ $? -eq 0 ]; thenreturnfish $ES_HOME/bin/elasticsearch}# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.while [ -h "$SCRIPT" ] ; dols=`ls -ld "$SCRIPT"`# Drop everything prior to ->link=`expr "$ls" : '.*-> \(.*\)$'`if expr "$link" : '/.*' > /dev/null; thenSCRIPT="$link"elseSCRIPT=`dirname "$SCRIPT"`/"$link"fidoneZS_HOME=`dirname "$SCRIPT"`/..RUNTIME_HOME=$ZS_HOME/runtimemkdir -p $RUNTIME_HOMEls -d $RUNTIME_HOME/elasticsearch* &>/dev/nullif [ $? -ne 0 ]; thenunzip_elasticsearchfiES_HOME=`ls -d $RUNTIME_HOME/elasticsearch*`ls -d $RUNTIME_HOME/apache-tomcat* &>/dev/nullif [ $? -ne 0 ]; thenunzip_tomcat_deploy_warfiTOMCAT_HOME=`ls -d $RUNTIME_HOME/apache-tomcat*`echo $ES_HOMEecho $TOMCAT_HOMEstart_elasticsearchusage() {echo "usage: 0ドル[start|stop|restart]"exit 1}if [ $# -eq 0 ]; thenusagefistart_tomcat() {sh $TOMCAT_HOME/bin/startup.shecho "start zstack ... SUCCESS"}stop_tomcat() {sh $TOMCAT_HOME/bin/shutdown.shecho "start zstack ... SUCCESS"}restart_tomcat() {start_tomcatstop_tomcat}if [ 1ドル == 'start' ]; thenstart_tomcatelif [ 1ドル == 'stop' ]; thenstop_tomcatelif [ 1ドル == 'restart' ]; thenrestart_tomcatelseusagefi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。