mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-27 20:53:01 +00:00
Add 'default' runlevel to x-ui service in Alpine
it should be 'default' runlevel when add x-ui service to openrc, default is 'sysinit' runlevel. 'sysinit' runlevel is unnecessary,maybe.
if not, there is an error when call to function 'check_enabled()' as command 'grep default -c' can`t print 'default' runlevel.
check_enabled() {
if [[ $release == "alpine" ]]; then
if [[ $(rc-update show | grep -F 'x-ui' | grep default -c) == 1 ]]; then
return 0
else
return 1
fi
This commit is contained in:
parent
37f0880f8f
commit
f9ff3758a0
1 changed files with 1 additions and 1 deletions
2
x-ui.sh
2
x-ui.sh
|
|
@ -421,7 +421,7 @@ status() {
|
|||
|
||||
enable() {
|
||||
if [[ $release == "alpine" ]]; then
|
||||
rc-update add x-ui
|
||||
rc-update add x-ui default
|
||||
else
|
||||
systemctl enable x-ui
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue