mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-13 22:53:10 +00:00
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
This commit is contained in:
13
install.sh
13
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
|
||||
|
||||
Reference in New Issue
Block a user