mirror of https://github.com/1Panel-dev/1Panel
parent
eb4d550305
commit
12c6fe6331
|
@ -75,6 +75,10 @@ func (c *ClamService) LoadBaseInfo() (dto.ClamBaseInfo, error) {
|
||||||
baseInfo.FreshIsExist = true
|
baseInfo.FreshIsExist = true
|
||||||
baseInfo.FreshIsActive, _ = systemctl.IsActive(freshClamService)
|
baseInfo.FreshIsActive, _ = systemctl.IsActive(freshClamService)
|
||||||
}
|
}
|
||||||
|
stdout, err := cmd.Exec("which clamdscan")
|
||||||
|
if err != nil || (len(strings.ReplaceAll(stdout, "\n", "")) == 0 && strings.HasPrefix(stdout, "/")) {
|
||||||
|
baseInfo.IsActive = false
|
||||||
|
}
|
||||||
|
|
||||||
if baseInfo.IsActive {
|
if baseInfo.IsActive {
|
||||||
version, err := cmd.Exec("clamdscan --version")
|
version, err := cmd.Exec("clamdscan --version")
|
||||||
|
|
Loading…
Reference in New Issue