Add configurability to cluster option

merge-requests/28/head
knotteye 2020-10-17 02:17:10 -05:00
parent 80cf01ef30
commit 5126bccbc7
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,9 @@ media:
ffmpeg: '<ffmpeg>'
rtmp:
# enable cluster mode this will pretty much entirely
# break the ability to play rtmp for clients
cluster: false
port: 1935
http:

View File

@ -4,12 +4,13 @@ import {init as initHTTP} from "./http";
import {init as clean} from "./cleanup";
import {init as initChat} from "./chat";
import { config } from "./config";
import { execFile } from "child_process";
async function run() {
await initDB();
await clean();
await initHTTP();
await initRTMP();
config['rtmp']['cluster'] ? execFile(process.cwd()+'/node_modules/.bin/ts-node' [process.cwd()+'src/cluster.ts']) : await initRTMP();
await initChat();
console.log(`Satyr v${config['satyr']['version']} ready`);
}