Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Nov 1, 2024
1 parent 6567dbc commit f051e46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ cron.schedule('0,10,20,30,40,50 * * * * *', async () => {
return line;
}).join('\n');

await fs.writeFile('/opt/mediamtx/mediamtx.yml', config);
await fs.writeFile('/opt/mediamtx/mediamtx.yml.new', config);

// Ref: https://github.com/bluenviron/mediamtx/issues/937
await fs.rename(
'/opt/mediamtx/mediamtx.yml.new',
'/opt/mediamtx/mediamtx.yml'
);
} catch (err) {
console.error(err);
}
Expand Down

0 comments on commit f051e46

Please sign in to comment.