diff --git a/nbd_http_server.py b/nbd_http_server.py index a89e3e7..671f8ea 100755 --- a/nbd_http_server.py +++ b/nbd_http_server.py @@ -26,7 +26,7 @@ import subprocess import sys -WORKING_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), '') +WORKING_DIR = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), '') NBDKIT_PLUGIN = WORKING_DIR + '../lib64/nbdkit/plugins/nbdkit-multi-http-plugin.so' # ==============================================================================