Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9d6bcbd

Browse files
author
Sam Schott
committedMay 12, 2020
[daemon] migrate from lockfile to fasteners
see #135
1 parent 633e04a commit 9d6bcbd

File tree

3 files changed

+203
-140
lines changed

3 files changed

+203
-140
lines changed
 

‎maestral/cli.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,10 @@ def gui(config_name):
445445
def start(config_name: str, foreground: bool, verbose: bool):
446446
"""Starts the Maestral daemon."""
447447

448-
from maestral.daemon import get_maestral_pid, get_maestral_proxy
448+
from maestral.daemon import get_maestral_proxy
449449
from maestral.daemon import (start_maestral_daemon_thread, threads,
450450
start_maestral_daemon_process, Start)
451451

452-
# do nothing if already running
453-
if get_maestral_pid(config_name):
454-
click.echo('Maestral daemon is already running.')
455-
return
456-
457-
# start daemon
458452
click.echo('Starting Maestral...', nl=False)
459453

460454
if foreground:
@@ -464,6 +458,9 @@ def start(config_name: str, foreground: bool, verbose: bool):
464458

465459
if res == Start.Ok:
466460
click.echo('\rStarting Maestral... ' + OK)
461+
elif res == Start.AlreadyRunning:
462+
click.echo('\rStarting Maestral... Already running.')
463+
return
467464
else:
468465
click.echo('\rStarting Maestral... ' + FAILED)
469466
click.echo('Please check logs for more information.')

0 commit comments

Comments
 (0)