mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-24 12:01:56 -08:00
fix compatibility between confwatcher and legacy configuration file (#1642)
This commit is contained in:
parent
053f2ec282
commit
adbd4b7296
1 changed files with 8 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue