mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 11:46:18 +00:00
modified: x-ui.sh
This commit is contained in:
parent
d8ad3feb40
commit
cf358752b3
1 changed files with 4 additions and 3 deletions
7
x-ui.sh
7
x-ui.sh
|
@ -443,11 +443,12 @@ update_shell() {
|
|||
|
||||
# 0: running, 1: not running, 2: not installed
|
||||
check_status() {
|
||||
if [[ ! -f /etc/systemd/system/x-ui.service ]]; then
|
||||
temp=$(rc-service -l | grep x-ui)
|
||||
if [[ "${temp}" != "x-ui" ]]; then
|
||||
return 2
|
||||
fi
|
||||
temp=$(systemctl status x-ui | grep Active | awk '{print $3}' | cut -d "(" -f2 | cut -d ")" -f1)
|
||||
if [[ "${temp}" == "running" ]]; then
|
||||
temp=$(rc-status | grep x-ui | awk '{print $3}' | cut -d "(" -f2 | cut -d ")" -f1)
|
||||
if [[ "${temp}" == "started" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue