Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/config.go2
-rw-r--r--install.sh1
-rwxr-xr-xupdate.sh1
-rw-r--r--x-ui.sh3
4 files changed, 5 insertions, 2 deletions
diff --git a/config/config.go b/config/config.go
index 17c9a77f..e5b43a29 100644
--- a/config/config.go
+++ b/config/config.go
@@ -109,7 +109,7 @@ func GetLogFolder() string {
if runtime.GOOS == "windows" {
return filepath.Join(".", "log")
}
- return "/var/log"
+ return "/var/log/x-ui"
}
func copyFile(src, dst string) error {
diff --git a/install.sh b/install.sh
index 0cf91b44..480522ed 100644
--- a/install.sh
+++ b/install.sh
@@ -641,6 +641,7 @@ install_x-ui() {
# Update x-ui cli and se set permission
mv -f /usr/bin/x-ui-temp /usr/bin/x-ui
chmod +x /usr/bin/x-ui
+ mkdir -p /var/log/x-ui
config_after_install
if [[ $release == "alpine" ]]; then
diff --git a/update.sh b/update.sh
index ff0cea41..6da238b1 100755
--- a/update.sh
+++ b/update.sh
@@ -653,6 +653,7 @@ update_x-ui() {
chmod +x /usr/local/x-ui/x-ui.sh >/dev/null 2>&1
chmod +x /usr/bin/x-ui >/dev/null 2>&1
+ mkdir -p /var/log/x-ui >/dev/null 2>&1
echo -e "${green}Changing owner...${plain}"
chown -R root:root /usr/local/x-ui >/dev/null 2>&1
diff --git a/x-ui.sh b/x-ui.sh
index 32ddd8e0..8df28103 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -53,7 +53,8 @@ os_version=""
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"' | tr -d '.')
# Declare Variables
-log_folder="${XUI_LOG_FOLDER:=/var/log}"
+log_folder="${XUI_LOG_FOLDER:=/var/log/x-ui}"
+mkdir -p "${log_folder}"
iplimit_log_path="${log_folder}/3xipl.log"
iplimit_banned_log_path="${log_folder}/3xipl-banned.log"