Skip to content

Commit

Permalink
修复SELINUX 没关闭更新重启不成功的bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
qist committed Jun 6, 2023
1 parent 9cba61f commit ec39a54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xray-ui.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions xray-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'))
Expand Down

0 comments on commit ec39a54

Please sign in to comment.