+if [ "${ENABLE_ENCRYPT}"x = "true"x ]; then
+ sed -i "s|type:\s*https\?$|type: https|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?keyStorePath|keyStorePath|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?keyStorePassword|keyStorePassword|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?validateCerts|validateCerts|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?validatePeers|validatePeers|" "$main_path/conf/engine-d.yml"
+else
+ sed -i 's|type:\s*https\?$|type: http|' "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?keyStorePath|#keyStorePath|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?keyStorePassword|#keyStorePassword|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?validateCerts|#validateCerts|" "$main_path/conf/engine-d.yml"
+ sed -i "s|#\?validatePeers|#validatePeers|" "$main_path/conf/engine-d.yml"
+fi
+