Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议使用PID进行相关应用的启停 #16

Closed
cnzgray opened this issue Sep 17, 2018 · 3 comments
Closed

建议使用PID进行相关应用的启停 #16

cnzgray opened this issue Sep 17, 2018 · 3 comments

Comments

@cnzgray
Copy link
Contributor

cnzgray commented Sep 17, 2018

目前我是在树莓派上使用ss-tproxy配合create_ap提供wifi全局FQ的。

当我使用ss-tproxy restart的时候,ss-tproxy会将全部的dnsmasq进程都关闭,虽然可以通过更换DHCPD来提供dhcp服务,但是其实只需要ss-tproxy在启动和停止应用的时候,使用pid文件识别就可以解决相关问题了。

@zfl9
Copy link
Owner

zfl9 commented Sep 17, 2018

嗯,感谢提醒。稍后会进行更新的。

@cnzgray
Copy link
Contributor Author

cnzgray commented Sep 17, 2018

附上一个根据PID批量停止应用的脚本。

VARDIR=/var/tproxy
for x in $VARDIR/*.pid; do
    [[ -f $x ]] && kill -9 $(cat $x)
done

@zfl9
Copy link
Owner

zfl9 commented Sep 17, 2018

ok,收到。

@zfl9 zfl9 closed this as completed Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants