🚀 Some improvements for x-ui.sh and ip job (#665)

This commit is contained in:
Hamidreza
2023-07-01 15:56:43 +03:30
committed by GitHub
parent f726474a5d
commit 1028319386
17 changed files with 428 additions and 294 deletions

View File

@@ -14,6 +14,7 @@ import (
"runtime"
"strings"
"time"
"x-ui/config"
"x-ui/database"
"x-ui/logger"
@@ -250,7 +251,6 @@ func (s *ServerService) GetXrayVersions() ([]string, error) {
}
func (s *ServerService) StopXrayService() (string error) {
err := s.xrayService.StopXray()
if err != nil {
logger.Error("stop xray failed:", err)
@@ -261,7 +261,6 @@ func (s *ServerService) StopXrayService() (string error) {
}
func (s *ServerService) RestartXrayService() (string error) {
s.xrayService.StopXray()
defer func() {
err := s.xrayService.RestartXray(true)
@@ -377,7 +376,6 @@ func (s *ServerService) UpdateXray(version string) error {
}
return nil
}
func (s *ServerService) GetLogs(count string, logLevel string) ([]string, error) {