Skip to content

Commit bc93003

Browse files
committed
update initmudbjson.sh
1 parent 1a2c7ed commit bc93003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

initmudbjson.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ip_addr=`ifconfig -a|grep inet|grep -v inet6|grep -v "127.0.0."|grep -v -e "192\
66
ip_count=`echo $ip_addr|grep -e "^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$" -c`
77
if [[ $ip_count == 1 ]]; then
88
echo "server IP is "${ip_addr}
9-
sed -i 's/SERVER_PUB_ADDR = .\+/SERVER_PUB_ADDR = '${ip_addr}'/g' userapiconfig.py
9+
sed -i "s/SERVER_PUB_ADDR = .\+/SERVER_PUB_ADDR = \'"${ip_addr}"\'/g" userapiconfig.py
1010
user_count=`python mujson_mgr.py -l|grep -c -e "[0-9]"`
1111
if [[ $user_count == 0 ]]; then
1212
port=`python -c 'import random;print(random.randint(10000, 65536))'`

0 commit comments

Comments
 (0)