From ec39a540ded4176b6037ea0e8ff58a10905aa74b Mon Sep 17 00:00:00 2001 From: qist <87984115@qq.com> Date: Tue, 6 Jun 2023 14:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSELINUX=20=E6=B2=A1=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=9B=B4=E6=96=B0=E9=87=8D=E5=90=AF=E4=B8=8D=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E7=9A=84bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xray-ui.service | 2 ++ xray-ui.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/xray-ui.service b/xray-ui.service index 88466c43..ddcc61ed 100644 --- a/xray-ui.service +++ b/xray-ui.service @@ -7,6 +7,8 @@ Wants=network.target Type=simple WorkingDirectory=/usr/local/xray-ui/ ExecStart=/usr/local/xray-ui/xray-ui +Restart=on-failure +RestartSec=5s [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/xray-ui.sh b/xray-ui.sh index 57b48ebe..6ed4d6c6 100644 --- a/xray-ui.sh +++ b/xray-ui.sh @@ -138,6 +138,10 @@ update() { arch="amd64" echo -e "${red}检测架构失败,使用默认架构: ${arch}${plain}" fi + + if [[ x"${release}" == x"centos" ]]; then + setenforce 0 >/dev/null 2>&1 + fi systemctl stop xray-ui curl -sS -H "Accept: application/vnd.github.v3+json" -o "/tmp/tmp_file" 'https://api.github.com/repos/qist/xray-ui/releases/latest' releases_version=($(sed 'y/,/\n/' "/tmp/tmp_file" | grep 'tag_name' | awk -F '"' '{print $4}'))