mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-16 20:42:40 +08:00
parent
eb4d550305
commit
12c6fe6331
1 changed files with 4 additions and 0 deletions
|
|
@ -75,6 +75,10 @@ func (c *ClamService) LoadBaseInfo() (dto.ClamBaseInfo, error) {
|
|||
baseInfo.FreshIsExist = true
|
||||
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 {
|
||||
version, err := cmd.Exec("clamdscan --version")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue