+if ! command -v yq > /dev/null 2>&1; then
+ echo "yq is not installed. Installing yq..."
+ sudo snap install yq --channel=v3/stable
+fi
+
+INSTALL_KONG=$(yq read "$OVERRIDEYAML" 'nonrtric.installKong')
+if [ $? -ne 0 ] || [ -z "$INSTALL_KONG" ]; then
+ echo "Error: failed to parse installKong from YAML with yq. Aborting install."
+ exit 1
+fi
+
+INSTALL_CAPIF=$(yq read "$OVERRIDEYAML" 'nonrtric.installCapifcore')
+if [ $? -ne 0 ] || [ -z "$INSTALL_CAPIF" ]; then
+ echo "Error: failed to parse installCapifcore from YAML with yq. Aborting install."
+ exit 1
+fi
+
+INSTALL_SERVICEMANAGER=$(yq read "$OVERRIDEYAML" 'nonrtric.installServicemanager')
+if [ $? -ne 0 ] || [ -z "$INSTALL_SERVICEMANAGER" ]; then
+ echo "Error: failed to parse installServicemanager from YAML with yq. Aborting install."
+ exit 1
+fi
+
+if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
+ if [ "$INSTALL_KONG" == "false" ]; then
+ echo "Error: INSTALL_KONG must be true if INSTALL_SERVICEMANAGER is true. Aborting install."
+ exit 1
+ fi
+ if [ "$INSTALL_CAPIF" == "false" ]; then
+ echo "Error: INSTALL_CAPIF must be true if INSTALL_SERVICEMANAGER is true. Aborting install."
+ exit 1
+ fi
+fi