fix: make BASE_DIR dynamic so script works from any directory

This commit is contained in:
SashegDev
2026-05-16 16:51:06 +00:00
parent ac70aaae03
commit e2c3872fe3
+1 -1
View File
@@ -33,7 +33,7 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("zernproxy")
BASE_DIR = "/opt/aggregator"
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
SERVERS_CONF = os.path.join(BASE_DIR, "servers.conf")
SETTINGS_CONF = os.path.join(BASE_DIR, "settings.conf")
USERS_DB = os.path.join(BASE_DIR, "users.db")