Skip to content

Commit

Permalink
add public ip
Browse files Browse the repository at this point in the history
Signed-off-by: revol.cai <[email protected]>
  • Loading branch information
revol.cai committed Dec 6, 2016
1 parent 5aa0712 commit 0212887
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geth/monitored-geth-client/start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
set -e
cd /root/eth-net-intelligence-api
sed -ie "s/HOSTNAME_ENV/$(hostname)/g" app.json
# sed -ie "s/HOSTNAME_ENV/$(hostname)/g" app.json
sed -ie "s/HOSTNAME_ENV/$(hostname)-$(node -e "require('http').get('http://ip.taobao.com/service/getIpInfo.php?ip=myip',(res)=>{res.setEncoding('utf8');data='';res.on('data',(chunk)=>data+=chunk);res.on('end',()=>{console.log(JSON.parse(data).data.ip)})})")/g" app.json
sed -ie "s/WS_SERVER_ENV/$(echo $WS_SERVER|sed -e 's/[]\/$*.^|[]/\\&/g')/g" app.json
sed -ie "s/WS_SECRET_ENV/$(echo $WS_SECRET|sed -e 's/[]\/$*.^|[]/\\&/g')/g" app.json
/usr/local/bin/pm2 start ./app.json
Expand Down

0 comments on commit 0212887

Please sign in to comment.