aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorPiotr Bochenski <piotr.bochenski@nokia.com>2018-06-08 17:49:58 +0200
committerPiotr Bochenski <piotr.bochenski@nokia.com>2018-06-12 17:58:15 +0200
commit0421f6b4f00cf4657d3aee35946d5ebb8b1c2132 (patch)
tree8ba811f6a6f8ca11178aab1a87404dcd9b9f1cf8 /src/main
parentf5c6dcfb9e72bd7d55b24584c651e7dd2ae8990e (diff)
Replace shell build scripts with Maven solution
Remove dead bash code that is being executed during Maven build phases and reimplement Docker interaction using plain Maven solution. This change simplifies build procedure and allows developers to easily build, run and test their own self-built VES image on local machine. Issue-ID: DCAEGEN2-534 Change-Id: I63eb150406b78a71a55fdc728a4fbb4e1a4e6554 Signed-off-by: Piotr Bochenski <piotr.bochenski@nokia.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scripts/VESrestfulCollector.sh16
1 files changed, 8 insertions, 8 deletions
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