validate systemctl command

This commit is contained in:
Maycon Santos
2022-08-31 17:58:43 +02:00
parent 43eac3eb40
commit e6fe74ca0a
+1 -1
View File
@@ -23,7 +23,7 @@ func isSystemd() bool {
if _, err := os.Stat("/run/systemd/system"); err == nil {
return true
}
if _, err = exec.LookPath("systemctl"); err != nil {
if _, err := exec.LookPath("systemctl"); err != nil {
return false
}
if _, err := os.Stat("/proc/1/comm"); err == nil {