xray优雅重启
执行 c 后,它会自动:
停止 Xray
等待旧进程退出
清理僵尸 Xray
启动新的 Xray
等 1 秒让 systemd 稳定
自动显示 Xray 是否 Runningcat > /usr/local/bin/c << 'EOF'
#!/bin/bash
systemctl stop xray
sleep 2
pkill -f xray
systemctl start xray
sleep 1
systemctl status xray --no-pager
EOF
chmod +x /usr/local/bin/c