summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/assembly/dep.xml159
-rw-r--r--src/main/scripts/VESrestfulCollector.sh16
2 files changed, 84 insertions, 91 deletions
diff --git a/src/assembly/dep.xml b/src/assembly/dep.xml
index b322fba1..7d72f84f 100644
--- a/src/assembly/dep.xml
+++ b/src/assembly/dep.xml
@@ -1,86 +1,79 @@
<!--
- ============LICENSE_START=======================================================
- PROJECT
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- 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.
- ============LICENSE_END=========================================================
- -->
+================================================================================
+Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
+Copyright (c) 2018 Nokia. All rights reserved.
+================================================================================
+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
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>bundle</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <files>
- <file>
- <source>target/${project.artifactId}-${project.version}.jar</source>
- <outputDirectory>lib</outputDirectory>
- </file>
- </files>
- <fileSets>
- <fileSet>
- <directory>src/main/scripts</directory>
- <outputDirectory>bin</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0755</fileMode>
- <lineEnding>unix</lineEnding>
- </fileSet>
- <fileSet>
- <directory>etc</directory>
- <outputDirectory>etc</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.conf</include>
- </includes>
- <outputDirectory>etc</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>dpo/data-formats</directory>
- <includes>
- <include>**/*.json</include>
- </includes>
- <outputDirectory>specs</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>dpo/spec</directory>
- <includes>
- <include>**/*.json</include>
- </includes>
- <outputDirectory>specs</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>./</directory>
- <includes>
- <include>Dockerfile</include>
- </includes>
- <outputDirectory>./</outputDirectory>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <includes>
- <include>*:jar</include>
- </includes>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
-</assembly>
+ 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.
+============LICENSE_END=========================================================
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+
+ <id>bundle</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/scripts</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>**/*.sh</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ <lineEnding>unix</lineEnding>
+ </fileSet>
+ <fileSet>
+ <directory>etc</directory>
+ <outputDirectory>etc</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.conf</include>
+ </includes>
+ <outputDirectory>etc</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>dpo/data-formats</directory>
+ <includes>
+ <include>**/*.json</include>
+ </includes>
+ <outputDirectory>specs</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>dpo/spec</directory>
+ <includes>
+ <include>**/*.json</include>
+ </includes>
+ <outputDirectory>specs</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <scope>runtime</scope>
+ <useProjectArtifact>true</useProjectArtifact>
+ <unpack>false</unpack>
+ <outputDirectory>lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/src/main/scripts/VESrestfulCollector.sh b/src/main/scripts/VESrestfulCollector.sh
index 4e3fd83e..c883f6de 100644
--- a/src/main/scripts/VESrestfulCollector.sh
+++ b/src/main/scripts/VESrestfulCollector.sh
@@ -32,7 +32,7 @@ BASEDIR=/opt/app/VESCollector/
collector_start() {
echo `date +"%Y%m%d.%H%M%S%3N"` - collector_start | tee -a ${BASEDIR}/logs/console.txt
- collectorPid=`pgrep -f org.onap.dcae.commonFunction`
+ collectorPid=`pidof org.onap.dcae.commonFunction`
if [ ! -z "$collectorPid" ]; then
echo "WARNING: VES Restful Collector already running as PID $collectorPid" | tee -a ${BASEDIR}/logs/console.txt
@@ -56,13 +56,13 @@ collector_start() {
collector_stop() {
echo `date +"%Y%m%d.%H%M%S%3N"` - collector_stop
- collectorPid=`pgrep -f org.onap.dcae.commonFunction`
+ collectorPid=`pidof org.onap.dcae.commonFunction`
if [ ! -z "$collectorPid" ]; then
echo "Stopping PID $collectorPid"
kill -9 $collectorPid
sleep 5
- if [ ! "$(pgrep -f org.onap.dcae.commonFunction)" ]; then
+ if [ ! "$(pidof org.onap.dcae.commonFunction)" ]; then
echo "VES Restful Collector has been stopped!!!"
else
echo "VES Restful Collector is being stopped!!!"
@@ -107,16 +107,16 @@ collector_configupdate() {
else
echo "INFO: Dynamic config updated successfully into VESCollector configuration!"
fi
-
+
# Identify alias names from keystore and password provided
-
+
paramName="collector.keystore.alias"
localpropertyfile="/opt/app/VESCollector/etc/collector.properties"
tmpfile="/opt/app/VESCollector/etc/collector.properties.tmp"
-
+
keystore=`grep collector.keystore.file.location $localpropertyfile | tr -d '[:space:]' | cut -d"=" -f2`
keypwdfile=`grep collector.keystore.passwordfile $localpropertyfile | tr -d '[:space:]' | cut -d"=" -f2`
-
+
echo "/usr/bin/keytool -list -keystore $keystore < $keypwdfile | grep "PrivateKeyEntry" | cut -d"," -f1"
tmpalias=`/usr/bin/keytool -list -keystore $keystore < $keypwdfile | grep "PrivateKeyEntry" | cut -d"," -f1`
echo "tmpalias:" $tmpalias
@@ -126,7 +126,7 @@ collector_configupdate() {
echo `cat $tmpfile > $localpropertyfile`
rm $tmpfile
echo "INFO: Keystore alias updated into configuration"
-
+
else
echo "ERROR: Configuration file /opt/app/KV-Configuration.json missing"
fi