Adding dynamic interpreter selector and real script path finding

This commit is contained in:
2024-02-15 10:55:53 +01:00
parent aa60dd2529
commit 8a84a70c59

8
main.py Normal file → Executable file
View File

@@ -1,3 +1,5 @@
#!/usr/bin/env python3
import os
import json
@@ -5,10 +7,10 @@ import requests
import config
DOCKER_COMPOSE_PATH = config.portainer_compose_dir + '/{}/docker-compose.yml'
BASH_COMPANION_SCRIPT = os.getcwd() + '/docker_updater.sh'
REPO_UPDATER_SCRIPT = os.getcwd() + '/update_repos.sh'
SCRIPT_DIR = os.path.dirname(__file__)
BASH_COMPANION_SCRIPT = f'{SCRIPT_DIR}/docker_updater.sh'
REPO_UPDATER_SCRIPT = f'{SCRIPT_DIR}/update_repos.sh'
class PortainerClient: