Github user denalex commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1306#discussion_r148685123
--- Diff: pxf/pxf-service/src/scripts/pxf-service ---
@@ -249,6 +206,34 @@ function patchWebapp()
cat $web_file | \
sed
"s:<param-value>.*pxf-log4j.properties<\/param-value>:<param-value>$PXF_HOME\/conf\/pxf-log4j.properties<\/param-value>:"
> web.xml.tmp
mv web.xml.tmp $web_file
+
+ # set port
+
catalinaProperties=$instance_root/$instance_name/conf/catalina.properties
+ cat $catalinaProperties | \
+ sed
"s|^[[:blank:]]*connector.http.port=.*$|connector.http.port=$instance_port|g" \
+ > ${catalinaProperties}.tmp
+
+ rm $catalinaProperties
+ mv ${catalinaProperties}.tmp $catalinaProperties
--- End diff --
can we just copy from a template and "sed" in place instead of all these
file manipulations ?
---