mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
core: remove unused function
This commit is contained in:
@@ -2,7 +2,6 @@ package utils
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type AppChecker interface {
|
||||
@@ -43,16 +42,3 @@ func AnyCommandExists(cmds ...string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsServiceActive(name string, userService bool) bool {
|
||||
if !CommandExists("systemctl") {
|
||||
return false
|
||||
}
|
||||
|
||||
args := []string{"is-active", name}
|
||||
if userService {
|
||||
args = []string{"--user", "is-active", name}
|
||||
}
|
||||
output, _ := exec.Command("systemctl", args...).Output()
|
||||
return strings.EqualFold(strings.TrimSpace(string(output)), "active")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user