Support daemon mode on linux AND freebsd

This commit is contained in:
Gina Häußge 2017-03-19 10:53:44 +01:00
parent ac6900ffb6
commit 6613d580f2
2 changed files with 4 additions and 4 deletions

View file

@ -160,11 +160,11 @@ def octo(ctx, **kwargs):
"start|stop|restart\" is deprecated, please use "
"\"octoprint daemon start|stop|restart\" from now on")
if sys.platform == "linux2":
if sys.platform.startswith("linux") or sys.platform.startswith("freebsd"):
from octoprint.cli.server import daemon_command
ctx.invoke(daemon_command, command=daemon, **kwargs)
else:
click.echo("Sorry, daemon mode is only supported under Linux right now")
click.echo("Sorry, daemon mode is not supported under your operating system right now")
else:
click.echo("Starting the server via \"octoprint\" is deprecated, "
"please use \"octoprint serve\" from now on.")

View file

@ -150,8 +150,8 @@ def serve_command(ctx, **kwargs):
allow_root, logging, verbosity, safe_mode)
if sys.platform == "linux2":
# we only support daemon mode under Linux
if sys.platform.startswith("linux") or sys.platform.startswith("freebsd"):
# we only support daemon mode under Linux and FreeBSD for now
@server_commands.command(name="daemon")
@server_options