diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-08-11 16:26:07 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-08-16 13:20:25 -0400 |
commit | 0aad2437c516c6c7e506179760c8b5e6556be8b1 (patch) | |
tree | fdc9c71230c94407426acda875fdeb75389dac93 /klippy/klippy.py | |
parent | ebc79a1ee867afa0bba703802ed9f9f57e5ab3b7 (diff) | |
download | kutter-0aad2437c516c6c7e506179760c8b5e6556be8b1.tar.gz kutter-0aad2437c516c6c7e506179760c8b5e6556be8b1.tar.xz kutter-0aad2437c516c6c7e506179760c8b5e6556be8b1.zip |
webhooks: Specify server_address on klippy command-line
Don't default to "/tmp/klippy_uds" for the webhooks unix domain socket
filename. Instead, require the filename to be specified on the
command-line (via a new "-a" parameter).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index 6a24d4a3..33a96a7a 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -247,6 +247,8 @@ def main(): opts.add_option("-I", "--input-tty", dest="inputtty", default='/tmp/printer', help="input tty name (default is /tmp/printer)") + opts.add_option("-a", "--api-server", dest="apiserver", + help="api server unix domain socket filename") opts.add_option("-l", "--logfile", dest="logfile", help="write log to file instead of stderr") opts.add_option("-v", action="store_true", dest="verbose", @@ -259,7 +261,8 @@ def main(): options, args = opts.parse_args() if len(args) != 1: opts.error("Incorrect number of arguments") - start_args = {'config_file': args[0], 'start_reason': 'startup'} + start_args = {'config_file': args[0], 'apiserver': options.apiserver, + 'start_reason': 'startup'} debuglevel = logging.INFO if options.verbose: |