From 10283193862e7bd36b20e6b2c41411d251961c27 Mon Sep 17 00:00:00 2001 From: Hamidreza <70919649+hamid-gh98@users.noreply.github.com> Date: Sat, 1 Jul 2023 15:56:43 +0330 Subject: =?UTF-8?q?=F0=9F=9A=80=20Some=20improvements=20for=20x-ui.sh=20an?= =?UTF-8?q?d=20ip=20job=20(#665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/config.go b/config/config.go index 30f0ca81..70be5ae6 100644 --- a/config/config.go +++ b/config/config.go @@ -65,3 +65,11 @@ func GetDBFolderPath() string { func GetDBPath() string { return fmt.Sprintf("%s/%s.db", GetDBFolderPath(), GetName()) } + +func GetLogFolder() string { + logFolderPath := os.Getenv("XUI_LOG_FOLDER") + if logFolderPath == "" { + logFolderPath = "/var/log" + } + return logFolderPath +} -- cgit v1.2.3