Add 'default' runlevel to x-ui service in Alpine (#3854)

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:
子寒 2026-03-04 19:32:01 +08:00 committed by GitHub
parent ccd223aeea
commit 842fae18d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -431,7 +431,7 @@ status() {
enable() { enable() {
if [[ $release == "alpine" ]]; then if [[ $release == "alpine" ]]; then
rc-update add x-ui rc-update add x-ui default
else else
systemctl enable x-ui systemctl enable x-ui
fi fi