diff options
author | 2016-09-21 17:19:59 +0800 | |
---|---|---|
committer | 2016-09-21 17:19:59 +0800 | |
commit | cfc26f42b310c4b1fe626b6b2faa3c932ef24d4e (patch) | |
tree | aea1e27337a55cece2e3c8c104166717f80c378c /catalog-core/distribution | |
parent | 6cc1d1cef6c9910cb8b50c1692c10e421f86565c (diff) |
TOSCA-68 Modify start and stop script.so that we can run or stop catalog service at any path
Change-Id: I98fbf875f163a0e2116e0667d2e4c7e03d5d8e5d
Issue-id: TOSCA-68
Signed-off-by: sunqi310 <sun.qi310@zte.com.cn>
Diffstat (limited to 'catalog-core/distribution')
4 files changed, 10 insertions, 7 deletions
diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh index 25a9bd90..268bc82b 100644 --- a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh +++ b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh @@ -20,11 +20,11 @@ echo @RUNHOME@ $RUNHOME echo "### Starting catalog"; cd catalog -./stop.sh & +$RUNHOME/catalog/stop.sh & cd $RUNHOME echo "\n\n### Starting catalog-http server" cd ./tomcat -./bin/shutdown.sh & +$RUNHOME/tomcat/bin/shutdown.sh & echo "### Starting catalog end..."; diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh index 41696fb1..ed5daa7d 100644 --- a/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh +++ b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh @@ -21,12 +21,15 @@ echo @RUNHOME@ $RUNHOME echo "### Starting catalog"; cd catalog -./run.sh & +$RUNHOME/catalog/run.sh & cd $RUNHOME echo "\n\n### Starting catalog-http server" cd ./tomcat -./bin/startup.sh & +if [ ! -d "$RUNHOME/tomcat/logs" ]; then + mkdir $RUNHOME/tomcat/logs +fi +$RUNHOME/tomcat/bin/startup.sh & echo "### Starting catalog end..."; diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat index 6663e3d7..0276d6f1 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat @@ -22,9 +22,9 @@ set password=%2 set port=%3 set host=%4 echo start init catalog db -echo HOME=$HOME +echo HOME=%HOME% cd /d %HOME% -mysql -u%user% -p%password% -P%port% -h%host% < dbscripts\mysql\openo-common_tosca-catalog-createobj.sql +mysql -u%user% -p%password% -P%port% -h%host% < %HOME%\dbscripts\mysql\openo-common_tosca-catalog-createobj.sql set "err=%errorlevel%" if "%err%"=="0" ( echo init catalog db success diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh index 2e5cd323..70d78fef 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh @@ -23,7 +23,7 @@ password=$2 port=$3 host=$4 echo "start init catalog db" -mysql -u$user -p$password -P$port -h$host <dbscripts/mysql/openo-common_tosca-catalog-createobj.sql +mysql -u$user -p$password -P$port -h$host <$HOME/dbscripts/mysql/openo-common_tosca-catalog-createobj.sql sql_result=$? if [ $sql_result != 0 ] ; then echo "failed to init catalog database!" |