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:
authorweekend sorrow <rain.hides.pain@gmail.com>2026-01-03 05:13:00 +0300
committerGitHub <noreply@github.com>2026-01-03 05:13:00 +0300
commit1393f981bc313118b3ffde0b469cc07abdeb24c8 (patch)
tree7380b1d35cbaf7577e4207bf24ee56f6b0083634
parent9a2c1c6b43471316f5cdd15b995f1e47b2f07d52 (diff)
feat: Add etckeeper compatibility (#3602)
-rw-r--r--install.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 480522ed..1009f047 100644
--- a/install.sh
+++ b/install.sh
@@ -643,6 +643,20 @@ install_x-ui() {
chmod +x /usr/bin/x-ui
mkdir -p /var/log/x-ui
config_after_install
+
+ # Etckeeper compatibility
+ if [ -d "/etc/.git" ]; then
+ if [ -f "/etc/.gitignore" ]; then
+ if ! grep -q "x-ui/x-ui.db" "/etc/.gitignore"; then
+ echo "" >> "/etc/.gitignore"
+ echo "x-ui/x-ui.db" >> "/etc/.gitignore"
+ echo -e "${green}Added x-ui.db to /etc/.gitignore for etckeeper${plain}"
+ fi
+ else
+ echo "x-ui/x-ui.db" > "/etc/.gitignore"
+ echo -e "${green}Created /etc/.gitignore and added x-ui.db for etckeeper${plain}"
+ fi
+ fi
if [[ $release == "alpine" ]]; then
wget --inet4-only -O /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc