Skip to content

Commit 9bf0117

Browse files
committed
Use full path for default config file
If the script is invoked from outside of the script directory the default config file could not be found.
1 parent 4e0b732 commit 9bf0117

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deploy_freenas.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
2929

3030
parser = argparse.ArgumentParser(description='Import and activate a SSL/TLS certificate into FreeNAS.')
31-
parser.add_argument('-c', '--config', default='deploy_config', help='Path to config file, defaults to deploy_config.')
31+
parser.add_argument('-c', '--config', default=(os.path.join(os.path.dirname(os.path.realpath(__file__)),
32+
'deploy_config')), help='Path to config file, defaults to deploy_config.')
3233
args = parser.parse_args()
3334

3435
if os.path.isfile(args.config):

0 commit comments

Comments
 (0)