mirror of
https://github.com/nadoo/glider.git
synced 2025-04-21 19:52:07 +08:00
check: change fwdr status after script check (#195)
This commit is contained in:
parent
eaaa6d5aa9
commit
1fcfeabdb1
@ -134,10 +134,13 @@ func (c *fileChecker) Check(fwdr *Forwarder) bool {
|
|||||||
|
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.F("[check] file:%s, %s(%d), FAILED. err: %s", c.path, fwdr.Addr(), fwdr.Priority(), err)
|
log.F("[check] file:%s(%d), FAILED. err: %s", fwdr.Addr(), fwdr.Priority(), err)
|
||||||
|
fwdr.Disable()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
log.F("[check] file:%s(%d), SUCCESS.", fwdr.Addr(), fwdr.Priority())
|
log.F("[check] file:%s(%d), SUCCESS.", fwdr.Addr(), fwdr.Priority())
|
||||||
|
fwdr.Enable()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user