TOSCA-68 Modify start and stop script.so that we can run or stop catalog service...
authorsunqi310 <sun.qi310@zte.com.cn>
Wed, 21 Sep 2016 09:19:59 +0000 (17:19 +0800)
committersunqi310 <sun.qi310@zte.com.cn>
Wed, 21 Sep 2016 09:19:59 +0000 (17:19 +0800)
Change-Id: I98fbf875f163a0e2116e0667d2e4c7e03d5d8e5d
Issue-id: TOSCA-68
Signed-off-by: sunqi310 <sun.qi310@zte.com.cn>
catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh
catalog-core/distribution/catalog-all/src/main/assembly/startup.sh
catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat
catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh

index 25a9bd9..268bc82 100644 (file)
@@ -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...";
index 41696fb..ed5daa7 100644 (file)
@@ -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...";
 
index 6663e3d..0276d6f 100644 (file)
@@ -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
index 2e5cd32..70d78fe 100644 (file)
@@ -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!"