|
|
|
@ -27,7 +27,14 @@ type ConfWatcher struct {
@@ -27,7 +27,14 @@ type ConfWatcher struct {
|
|
|
|
|
// New allocates a ConfWatcher.
|
|
|
|
|
func New(confPath string) (*ConfWatcher, error) { |
|
|
|
|
if _, err := os.Stat(confPath); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
if confPath == "mediamtx.yml" { |
|
|
|
|
confPath = "rtsp-simple-server.yml" |
|
|
|
|
if _, err := os.Stat(confPath); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inner, err := fsnotify.NewWatcher() |
|
|
|
|