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

x-ui restart命令无法重启x-ui及xray内核(无论x-ui后面跟什么参数都会被忽略而直接进菜单) #41

Closed
CellLz opened this issue Jun 11, 2024 · 1 comment

Comments

@CellLz
Copy link

CellLz commented Jun 11, 2024

在安装完x-ui-yg版的x-ui以后,输入x-ui可以正常进入脚本的菜单页面,但是x-ui后面加上的参数被无法识别,比如,本来输入命令x-ui restart就可以让x-ui重启,但是现在输入x-ui restart之后的效果是直接进入脚本菜单而忽略了后面的restart参数,这样导致的结果就是无法使用该命令重启脚本。
还有,这个脚本在crontab中添加了一个每天定时重启脚本的任务,但是现在的结果导致了无法通过x-ui restart命令进行重启,只有输入systemctl restart x-ui.service命令才能重启。这个问题也同样存在于/usr/local/x-ui/goxui.sh中,即使它检测到了xui或xray没有正常运行也无法重启xui。
建议在下一个版本的程序中修正这个问题,只要将x-ui restart换成systemctl restart x-ui.service就行了。
另外,goxui.sh这个保活脚本其实只需要写两行代码即可完成原有功能,它们的功能就是判断x-ui和xray是否在正常运行,如果没有运行则重新启动x-ui。
以下代码供参考:
#!/bin/bash
ps -aux | grep -v grep | grep -q x-ui || systemctl restart x-ui.service
ps -aux | grep -v grep | grep -q xray || systemctl restart x-ui.service

谢谢!

@yonggekkk
Copy link
Owner

yonggekkk commented Jun 12, 2024

感谢反馈。已修正。。

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