Merge pull request #62 from mrueg/update-cmds

Improve syslog detection
This commit is contained in:
Yoav Rotem 2020-12-08 10:34:21 +02:00 committed by GitHub
commit c2506e32d8
Failed to generate hash of commit
2 changed files with 2 additions and 2 deletions

2
app.go
View file

@ -132,7 +132,7 @@ func getConstraints() (constraints []string, err error) {
fmt.Sprintf("syslog=%s", syslog), fmt.Sprintf("syslog=%s", syslog),
fmt.Sprintf("lsm=%s", lsm), fmt.Sprintf("lsm=%s", lsm),
) )
glog.V(1).Info(fmt.Sprintf("The constraints are:, %s", constraints)) glog.V(1).Info(fmt.Sprintf("The constraints are:, %s", constraints))
return constraints, nil return constraints, nil
} }

View file

@ -52,7 +52,7 @@ func GetBootLoader() (boot string, err error) {
} }
func GetSystemLogManager() (syslog string, err error) { func GetSystemLogManager() (syslog string, err error) {
out, err := exec.Command("bash", "-c", "sudo lsof | grep /var/log/syslog | cut -f1 -d' '").Output() out, err := exec.Command("bash", "-c", "sudo lsof +D /var/log | grep /var/log/syslog | cut -f1 -d' '").Output()
if err != nil { if err != nil {
out, err := exec.Command("bash", "-c", "service rsyslog status").Output() out, err := exec.Command("bash", "-c", "service rsyslog status").Output()
if err != nil { if err != nil {