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:
authorMikhail Grigorev <sleuthhound@gmail.com>2026-01-03 05:37:48 +0300
committerGitHub <noreply@github.com>2026-01-03 05:37:48 +0300
commit3287fa4d80672f9f5fcf90e6059a190939445297 (patch)
tree0f55caef9541032253c71aeea7c7c36285c11799 /install.sh
parent1393f981bc313118b3ffde0b469cc07abdeb24c8 (diff)
Added EnvironmentFile to systemd unit (#3606)
* Added EnvironmentFile to systemd unit * Added support for older releases * Remove ARGS * Fixed copy unit * Fixed unit filename * Update update.sh
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index 1009f047..d3f15409 100644
--- a/install.sh
+++ b/install.sh
@@ -668,7 +668,18 @@ install_x-ui() {
rc-update add x-ui
rc-service x-ui start
else
- cp -f x-ui.service /etc/systemd/system/
+ if [ -f "x-ui.service" ]; then
+ cp -f x-ui.service /etc/systemd/system/
+ else
+ case "${release}" in
+ ubuntu | debian | armbian)
+ cp -f x-ui.service.debian /etc/systemd/system/x-ui.service
+ ;;
+ *)
+ cp -f x-ui.service.rhel /etc/systemd/system/x-ui.service
+ ;;
+ esac
+ fi
systemctl daemon-reload
systemctl enable x-ui
systemctl start x-ui