mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-13 05:51:58 +00:00
`14. Restart Xray` failed on Alpine with `systemctl: command not found` — restart_xray was the only service action missing an Alpine branch. While fixing it, the OpenRC reload action was passing the pidfile path to `kill` instead of the PID inside it, so `rc-service x-ui reload` would have failed too.
18 lines
No EOL
292 B
Text
18 lines
No EOL
292 B
Text
#!/sbin/openrc-run
|
|
|
|
command="/usr/local/x-ui/x-ui"
|
|
command_background=true
|
|
pidfile="/run/x-ui.pid"
|
|
description="x-ui Service"
|
|
procname="x-ui"
|
|
depend() {
|
|
need net
|
|
}
|
|
start_pre(){
|
|
cd /usr/local/x-ui
|
|
}
|
|
reload() {
|
|
ebegin "Reloading ${RC_SVCNAME}"
|
|
kill -USR1 $(cat $pidfile)
|
|
eend $?
|
|
} |