Fixing minor issues in *ComponentLogs keywords

Change-Id: I9140edac7db4e644e18b79c6e54294fb96cf68a0
diff --git a/vars/stopComponentsLogs.groovy b/vars/stopComponentsLogs.groovy
index fc0f0e9..24d2ad7 100644
--- a/vars/stopComponentsLogs.groovy
+++ b/vars/stopComponentsLogs.groovy
@@ -7,19 +7,25 @@
         compress: false, // wether to compress the logs in a tgz file
     ]
 
+    if (!config) {
+        config = [:]
+    }
+
+    def cfg = defaultConfig + config
+
     def tag = "jenkins-"
     println "Stopping all kail logging process"
     sh """
-    P_IDS="$(ps e -ww -A | grep "_TAG=jenkins-kail" | grep -v grep | awk '{print $1}')"
-    if [ -n "$P_IDS" ]; then
-        for P_ID in $P_IDS; do
-            kill -9 $P_ID
+    P_IDS="\$(ps e -ww -A | grep "_TAG=jenkins-kail" | grep -v grep | awk '{print \$1}')"
+    if [ -n "\$P_IDS" ]; then
+        for P_ID in \$P_IDS; do
+            kill -9 \$P_ID
         done
     fi
     """
-    if (compress) {
+    if (cfg.compress) {
         sh """
-        tar czf ${logsDir}/combined.tgz *
+        tar czf ${cfg.logsDir}/combined.tgz *
         rm *.log
         """