Skip to content

Commit

Permalink
update process kill on mining stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ddabek committed Feb 10, 2020
1 parent b196c08 commit 220c6bf
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/components/primary/full/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,24 @@ export default class Home extends React.Component {
hashrate: 0
}));

console.log(this.state.xmrig_pid);
spawn('killall', ['xmrig-osx']);
if (window.process.platform === 'darwin') {
console.log("entered darwin");
console.log(this.state.xmrig_pid);
spawn('killall', ['xmrig-osx']);

console.log("Mining was stopped");
} else if (window.process.platform === 'linux') {
console.log(this.state.xmrig_pid);
spawn('killall', ['xmrig-linux']);

console.log("Mining was stopped");
} else if (window.process.platform === 'win32') {
console.log(this.state.xmrig_pid);
spawn('killall', ['xmrig-win.exe']);

console.log("Mining was stopped");
}

console.log("Mining was stopped");
};

check_mining_status = async () => {
Expand Down

0 comments on commit 220c6bf

Please sign in to comment.