mirror of
https://github.com/zoriya/flood.git
synced 2026-06-06 03:56:42 +00:00
config.cli: exit when managed rTorrent daemon exits
This commit is contained in:
@@ -161,6 +161,13 @@ if (argv.rtorrent) {
|
||||
|
||||
const rTorrentProcess = spawn('rtorrent', args.concat(['-o', opts]));
|
||||
|
||||
rTorrentProcess.on('close', () => {
|
||||
process.exit();
|
||||
});
|
||||
rTorrentProcess.on('error', () => {
|
||||
process.exit();
|
||||
});
|
||||
|
||||
process.on('exit', () => {
|
||||
console.log('Killing rTorrent daemon...');
|
||||
rTorrentProcess.kill('SIGTERM');
|
||||
|
||||
Reference in New Issue
Block a user