美文网首页
玩转ubuntu——ngrok启动脚本

玩转ubuntu——ngrok启动脚本

作者: HelloHL | 来源:发表于2019-07-17 14:57 被阅读0次

服务端ngrok下新建start.sh文件

vi start.sh
# start.sh
pid=`ps -ef|grep "./bin/ngrokd -domain='domain.com' -httpAddr=':81' -httpsAddr=':444'"| grep -v "grep"|awk '{print $2}'`

if [ "$pid" != "" ]
then
echo "run.py already run, stop it first"
kill -9 ${pid}
fi

echo "starting now..."

nohup ./bin/ngrokd -domain="domain.com" -httpAddr=":81" -httpsAddr=":444" > test.out 2>&1 &

pid=`ps -ef|grep "./bin/ngrokd -domain="domain.com" -httpAddr=":81" -httpsAddr=:444> test.out 2>&1 &"| grep -v "grep"|awk '{print $2}'`

echo ${pid} > pid.out
echo "ngrokd -domain="domain.com" started at pid: "${pid}

相关文章

网友评论

      本文标题:玩转ubuntu——ngrok启动脚本

      本文链接:https://www.haomeiwen.com/subject/tgiqlctx.html