From 1c811dbf3e3dad514976f5c25080e682f0510db7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 2 Sep 2022 10:11:12 -0400 Subject: [PATCH] Fix python path automatically in confluent_selfcheck --- confluent_server/bin/confluent_selfcheck | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_server/bin/confluent_selfcheck b/confluent_server/bin/confluent_selfcheck index d7d38f01..bb405741 100755 --- a/confluent_server/bin/confluent_selfcheck +++ b/confluent_server/bin/confluent_selfcheck @@ -5,6 +5,11 @@ import socket import glob import ssl import sys +path = os.path.dirname(os.path.realpath(__file__)) +path = os.path.realpath(os.path.join(path, '..', 'lib', 'python')) +if path.startswith('/opt'): + # if installed into system path, do not muck with things + sys.path.append(path) import confluent.sshutil as sshutil import confluent.certutil as certutil import confluent.config.configmanager as configmanager