diff options
author | 2016-08-29 16:47:41 +0800 | |
---|---|---|
committer | 2016-08-29 16:47:41 +0800 | |
commit | 3e2bac5fcdc061cf62bd62e46bf5c2bbebc5eca0 (patch) | |
tree | 2bc48b1a0f0a213da27d392eedf1921357c7fdbf /catalog-core/distribution/catalog-all | |
parent | 34e5f44d9c170af67b1b685af339f21119affd31 (diff) |
add catalog service start and stop scripts
Change-Id: I10e37beac3fae52f5b233a56fadf27ac3bf2f01e
Signed-off-by: sunqi310 <sun.qi310@zte.com.cn>
Diffstat (limited to 'catalog-core/distribution/catalog-all')
5 files changed, 142 insertions, 0 deletions
diff --git a/catalog-core/distribution/catalog-all/pom.xml b/catalog-core/distribution/catalog-all/pom.xml index 37623729..88c45c4b 100644 --- a/catalog-core/distribution/catalog-all/pom.xml +++ b/catalog-core/distribution/catalog-all/pom.xml @@ -33,6 +33,32 @@ <build> <plugins> <plugin> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-resources</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>target/assembly/</outputDirectory> + <resources> + <resource> + <directory>src/main/assembly/</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + <overwrite>true</overwrite> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat new file mode 100644 index 00000000..9697dbab --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat @@ -0,0 +1,27 @@ +@REM
+@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@echo off
+title catalog
+
+set RUNHOME=%~dp0
+echo ##RUNHOME %RUNHOME%
+
+
+echo ### Starting catalog
+start /D %RUNHOME%catalog stop.bat
+
+echo ### Starting tomcat
+start /D %RUNHOME%tomcat bin\shutdown.bat
diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh new file mode 100644 index 00000000..ae1999ab --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DIRNAME=`dirname $0` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME + +echo "### Starting catalog"; +cd catalog +./stop.sh & +cd $RUNHOME + + +echo "\n\n### Starting catalog-http server" +cd ./tomcat +./bin/shutdown.sh & +echo "### Starting catalog end..."; diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat b/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat new file mode 100644 index 00000000..6dd72c8e --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat @@ -0,0 +1,28 @@ +@REM
+@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@echo off
+title catalog
+
+set RUNHOME=%~dp0
+echo ##RUNHOME %RUNHOME%
+
+
+echo ### Starting catalog
+start /D %RUNHOME%catalog run.bat
+
+echo ### Starting tomcat
+start /D %RUNHOME%tomcat bin\startup.bat
+
diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh new file mode 100644 index 00000000..212ebdea --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DIRNAME=`dirname $0` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME + +echo "### Starting catalog"; +cd catalog +./run.sh & +cd $RUNHOME + + +echo "\n\n### Starting catalog-http server" +cd ./tomcat +./bin/startup.sh & +echo "### Starting catalog end..."; + |