diff --git a/README.md b/README.md index 11c49ba..be77146 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ Alternatively, the host and port on which to bind can be defined via the configu If you want to run OctoPrint as a daemon (only supported on Linux), use - ./run --daemon {start|stop|restart} [--pidfile PIDFILE] + ./run --daemon {start|stop|restart} [--pid PIDFILE] -If you do not supply a custom pidfile location via `--pidfile PIDFILE`, it will be created at `/tmp/octoprint.pid`. +If you do not supply a custom pidfile location via `--pid PIDFILE`, it will be created at `/tmp/octoprint.pid`. You can also specify the configfile or the base directory (for basing off the `uploads`, `timelapse` and `logs` folders), e.g.: diff --git a/run b/run index e43344c..53c3ba7 100755 --- a/run +++ b/run @@ -47,13 +47,12 @@ def main(): sys.exit(2) daemon = Main(args.pidfile, args.config, args.basedir, args.host, args.port, args.debug) - if args.command is not None: - if "start" == args.command: - daemon.start() - elif "stop" == args.command: - daemon.stop() - elif "restart" == args.command: - daemon.restart() + if "start" == args.command: + daemon.start() + elif "stop" == args.command: + daemon.stop() + elif "restart" == args.command: + daemon.restart() else: octoprint = Server(args.config, args.basedir, args.host, args.port, args.debug) octoprint.run()