Skip to content

Commit

Permalink
Hard code the port number for gen-rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
terry-xiaoyu committed Jul 17, 2019
1 parent c8c44b3 commit 10cbfbc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions one_more_emqx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,18 @@ process_emqx_conf() {

cp -r emqx $NEW_EMQX

## change the rpc ports
$SED_REPLACE 's|tcp_server_port[ \t]*=.*|tcp_server_port = 5369|g' emqx/etc/emqx.conf
$SED_REPLACE 's|tcp_client_port[ \t]*=.*|tcp_client_port = 5370|g' emqx/etc/emqx.conf
$SED_REPLACE 's|tcp_client_port[ \t]*=.*|tcp_client_port = 5369|g' "$NEW_EMQX/etc/emqx.conf"
$SED_REPLACE 's|tcp_server_port[ \t]*=.*|tcp_server_port = 5370|g' "$NEW_EMQX/etc/emqx.conf"

conf_ext=*.conf
find $NEW_EMQX -name "${conf_ext}" | while read conf; do
if [ "${conf##*/}" = 'emqx.conf' ]
then
declare -a entries_to_be_inc=("node.dist_listen_min"
"dist_listen_max"
"tcp_server_port"
"tcp_client_port"
"listener.tcp.external"
"listener.tcp.internal"
"listener.ssl.external"
Expand All @@ -96,4 +100,3 @@ find $NEW_EMQX -name "${conf_ext}" | while read conf; do
echo "."
fi
done

0 comments on commit 10cbfbc

Please sign in to comment.