Merge pull request #2094 from lbryio/fix-win-daemon

Fix daemon startup on Windows if daemon running already
This commit is contained in:
Sean Yesmunt 2018-11-07 14:37:41 -05:00 committed by GitHub
commit 78332ca9a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "LBRY", "name": "LBRY",
"version": "0.25.1", "version": "0.26.0-rc.4",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.", "description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [ "keywords": [
"lbry" "lbry"
@ -134,7 +134,7 @@
"yarn": "^1.3" "yarn": "^1.3"
}, },
"lbrySettings": { "lbrySettings": {
"lbrynetDaemonVersion": "0.30.0", "lbrynetDaemonVersion": "0.30.1rc1",
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip", "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
"lbrynetDaemonDir": "static/daemon", "lbrynetDaemonDir": "static/daemon",
"lbrynetDaemonFileName": "lbrynet" "lbrynetDaemonFileName": "lbrynet"

View file

@ -64,7 +64,9 @@ if (isDev) {
} }
app.on('ready', async () => { app.on('ready', async () => {
const processList = await findProcess('name', 'lbrynet start'); const processListArgs = process.platform === 'win32' ? 'lbrynet' : 'lbrynet start';
const processList = await findProcess('name', processListArgs);
const isDaemonRunning = processList.length > 0; const isDaemonRunning = processList.length > 0;
if (!isDaemonRunning) { if (!isDaemonRunning) {