mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-05-05 14:48:49 +00:00
gracefully shutdown xray-core
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
4cc755c883
commit
1328bb5aba
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
"syscall"
|
||||||
"x-ui/config"
|
"x-ui/config"
|
||||||
"x-ui/util/common"
|
"x-ui/util/common"
|
||||||
|
|
||||||
|
@ -227,5 +228,5 @@ func (p *process) Stop() error {
|
||||||
if !p.IsRunning() {
|
if !p.IsRunning() {
|
||||||
return errors.New("xray is not running")
|
return errors.New("xray is not running")
|
||||||
}
|
}
|
||||||
return p.cmd.Process.Kill()
|
return p.cmd.Process.Signal(syscall.SIGTERM)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue