EDGEPOD-85 Add ability to enable coredump for OMEC apps

Core files will be generated when config.coreDump.enabled is set to
true. Path of the generated core files can be configured by setting
config.coreDump.path, which is set to /tmp/coredump by default.

Change-Id: I5149751ba091a1f49e2eee91a14889898301a7bf
diff --git a/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl b/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
index cd61eac..9dfa29f 100644
--- a/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
+++ b/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
@@ -16,10 +16,14 @@
 
 set -xe
 
+{{- if .Values.config.coreDump.enabled }}
+cp /bin/ngic_controlplane /tmp/coredump/
+{{- end }}
+
 mkdir -p /opt/cp/config
 cd /opt/cp/config
-cp /etc/cp/config/{adc_rules.cfg,cp_config.cfg,interface.cfg,meter_profile.cfg,pcc_rules.cfg,sdf_rules.cfg,app_config.cfg} .
 
+cp /etc/cp/config/{adc_rules.cfg,cp_config.cfg,interface.cfg,meter_profile.cfg,pcc_rules.cfg,sdf_rules.cfg,app_config.cfg} .
 sed -i "s/CP_ADDR/$POD_IP/g" interface.cfg
 
 . cp_config.cfg