V5.2.9 | XFS, hosting to partner platforms #1

Merged
clore merged 6 commits from xfs into main 2024-12-08 22:24:00 +00:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 5050648451 - Show all commits

View File

@ -51,7 +51,7 @@ async def initialize():
return False
code, stdout, stderr = await utils.async_run_command(
"dmidecode -t 2",
"dmidecode -t 2 2>&1",
20
)
if code == 0 and not stderr:
@ -60,7 +60,7 @@ async def initialize():
else:
return False
code, stdout, stderr = await utils.async_run_command(
"dmidecode",
"dmidecode 2>&1",
20
)
if code == 0 and not stderr:

View File

@ -114,8 +114,12 @@ async def clore_partner_configure(clore_partner_config):
vpn_secret_key=clore_partner_config["secret"]
)
async with aiofiles.open(os.path.join(CLIENT_CONFIGS_LOCATION, PARTNER_CONFIG_NAME), mode='r') as file:
saved_config = await file.read()
saved_config=''
config_exists = await aiofiles.os.path.exists(os.path.join(CLIENT_CONFIGS_LOCATION, PARTNER_CONFIG_NAME))
if config_exists:
async with aiofiles.open(os.path.join(CLIENT_CONFIGS_LOCATION, PARTNER_CONFIG_NAME), mode='r') as file:
saved_config = await file.read()
if saved_config != needed_openvpn_config:
async with aiofiles.open(os.path.join(CLIENT_CONFIGS_LOCATION, PARTNER_CONFIG_NAME), mode='w') as file: