mirror of
https://github.com/umputun/reproxy.git
synced 2024-09-11 08:55:25 +03:00
add a warning on missing configuration file for file provider
This commit is contained in:
parent
f610a631e4
commit
506ded3ad4
@ -35,6 +35,15 @@ func (d *File) Events(ctx context.Context) <-chan discovery.ProviderID {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check once if config file in place and it is file for real and not a directory
|
||||||
|
fi, err := os.Stat(d.FileName)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("[WARN] configuration file %s not found", d.FileName)
|
||||||
|
}
|
||||||
|
if err == nil && fi.IsDir() {
|
||||||
|
log.Printf("[WARN] %s is directory but configuration file expected", d.FileName)
|
||||||
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
tk := time.NewTicker(d.CheckInterval)
|
tk := time.NewTicker(d.CheckInterval)
|
||||||
lastModif := time.Time{}
|
lastModif := time.Time{}
|
||||||
|
Loading…
Reference in New Issue
Block a user