启动和关闭 路由器上的 代理

仅作以后参考之用

打开代理:

ps | grep 'python2 proxy.py' | grep -v grep || {
    echo 'Not running, then start'
    python2 /opt/local/goagent3111/local/proxy.py
    exit $?
}

关闭代理:

kill -9 `ps | awk '/python2 \/opt\/local\/goagent3111\/local\/proxy.py/{print $1}'`

标签: none

添加新评论