Skip to content

Commit

Permalink
update initmudbjson.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
breakwa11 committed Jun 28, 2017
1 parent 1a2c7ed commit bc93003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion initmudbjson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ip_addr=`ifconfig -a|grep inet|grep -v inet6|grep -v "127.0.0."|grep -v -e "192\
ip_count=`echo $ip_addr|grep -e "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$" -c`
if [[ $ip_count == 1 ]]; then
echo "server IP is "${ip_addr}
sed -i 's/SERVER_PUB_ADDR = .\+/SERVER_PUB_ADDR = '${ip_addr}'/g' userapiconfig.py
sed -i "s/SERVER_PUB_ADDR = .\+/SERVER_PUB_ADDR = \'"${ip_addr}"\'/g" userapiconfig.py
user_count=`python mujson_mgr.py -l|grep -c -e "[0-9]"`
if [[ $user_count == 0 ]]; then
port=`python -c 'import random;print(random.randint(10000, 65536))'`
Expand Down

0 comments on commit bc93003

Please sign in to comment.