Smallish fixes for argparser
parent
363f00775b
commit
b7a3105655
|
@ -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
|
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),
|
You can also specify the configfile or the base directory (for basing off the `uploads`, `timelapse` and `logs` folders),
|
||||||
e.g.:
|
e.g.:
|
||||||
|
|
13
run
13
run
|
@ -47,13 +47,12 @@ def main():
|
||||||
sys.exit(2)
|
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)
|
||||||
if args.command is not None:
|
if "start" == args.command:
|
||||||
if "start" == args.command:
|
daemon.start()
|
||||||
daemon.start()
|
elif "stop" == args.command:
|
||||||
elif "stop" == args.command:
|
daemon.stop()
|
||||||
daemon.stop()
|
elif "restart" == args.command:
|
||||||
elif "restart" == args.command:
|
daemon.restart()
|
||||||
daemon.restart()
|
|
||||||
else:
|
else:
|
||||||
octoprint = Server(args.config, args.basedir, args.host, args.port, args.debug)
|
octoprint = Server(args.config, args.basedir, args.host, args.port, args.debug)
|
||||||
octoprint.run()
|
octoprint.run()
|
||||||
|
|
Loading…
Reference in New Issue