From bba625a68f6c5a3353b2507cd69db9379d25a6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 9 Jan 2014 20:04:08 +0100 Subject: [PATCH] Also recognize --iknowwhatimdoing when running as daemon Fixes #337 (cherry picked from commit 417487e) --- src/octoprint/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/octoprint/__init__.py b/src/octoprint/__init__.py index 1a7747fd..dbd06e7d 100644 --- a/src/octoprint/__init__.py +++ b/src/octoprint/__init__.py @@ -3,8 +3,9 @@ import sys from octoprint.daemon import Daemon from octoprint.server import Server + class Main(Daemon): - def __init__(self, pidfile, configfile, basedir, host, port, debug): + def __init__(self, pidfile, configfile, basedir, host, port, debug, allowRoot): Daemon.__init__(self, pidfile) self._configfile = configfile @@ -12,9 +13,10 @@ class Main(Daemon): self._host = host self._port = port self._debug = debug + self._allowRoot = allowRoot def run(self): - octoprint = Server(self._configfile, self._basedir, self._host, self._port, self._debug) + octoprint = Server(self._configfile, self._basedir, self._host, self._port, self._debug, self._allowRoot) octoprint.run() def main(): @@ -50,7 +52,7 @@ def main(): print >> sys.stderr, "Sorry, daemon mode is only supported under Linux right now" sys.exit(2) - daemon = Main(args.pidfile, args.config, args.basedir, args.host, args.port, args.debug) + daemon = Main(args.pidfile, args.config, args.basedir, args.host, args.port, args.debug, args.allowRoot) if "start" == args.daemon: daemon.start() elif "stop" == args.daemon: